Using javascript to dynamically generate the html for a  Spry table

I have some javascript which generates html code for a Spry
table which displays the content of a Spry data set. The problem is
that after I generate the html, Spry never fills in the values for
the table.
Here's what I'm doing:
Using a data set observer, check for onPostLoad and generate
the html code
Using innerHTML, stuff the code into the appropriate
<div>
Use regionName.updateContent() to update the region I just
created with the html code I generated
Interestingly, if I take the generated source for my page and
remove the data set observer, the Spry table displays correctly
with all the expected values. This suggests to me that my generated
html code is correct, but that there is some sort of timing issue
(i.e. Spry doesn't know about the new code I generated).
Any suggestions?

jalperin wrote:
> Here's what I'm doing:
>
Using a data set observer, check for
onPostLoad and generate the html
> code
>
Using innerHTML, stuff the code into
the appropriate <div>
>
Use regionName.updateContent() to
update the region I just created
> with the html code I generated
>
> Interestingly, if I take the generated source for my
page and remove the data
> set observer, the Spry table displays correctly with all
the expected values.
> This suggests to me that my generated html code is
correct, but that there is
> some sort of timing issue (i.e. Spry doesn't know about
the new code I
> generated).
>
> Any suggestions?
I'd guess that it is a timing issue as well. I haven't looked
much at the dataset capability in Spry, but it may be that the
dataset "finds" all of the regions and code that it applies to
before the onPostLoad event is triggered. If that is the case, then
your generated code doesn't exist yet,and so the dataset thinks
that there is nothing for it to apply to.
Will the HTML that you generate change based upon the dataset
that is actually returned? I guess I'm looking for the reason why
the HTML is being generated when it could be in the page itself and
avoid this issue completely.
Danilo Celic
|
http://blog.extensioneering.com/
| WebAssist Extensioneer
| Adobe Community Expert

Similar Messages

  • [svn] 3120: When you point Flex Builder at a local sandbox trunk build, it couldn' t generate the html-templates folder correctly for new projects so we moved all the html templates up one level and removed the html-templates directory and adjusted build

    Revision: 3120
    Author: [email protected]
    Date: 2008-09-05 10:44:10 -0700 (Fri, 05 Sep 2008)
    Log Message:
    When you point Flex Builder at a local sandbox trunk build, it couldn't generate the html-templates folder correctly for new projects so we moved all the html templates up one level and removed the html-templates directory and adjusted build.xml's to accommodate the directory change
    Modified Paths:
    flex/sdk/trunk/build.xml
    flex/sdk/trunk/webapps/webtier/build.xml
    Added Paths:
    flex/sdk/trunk/templates/client-side-detection/
    flex/sdk/trunk/templates/client-side-detection/AC_OETags.js
    flex/sdk/trunk/templates/client-side-detection/index.template.html
    flex/sdk/trunk/templates/client-side-detection-with-history/
    flex/sdk/trunk/templates/client-side-detection-with-history/AC_OETags.js
    flex/sdk/trunk/templates/client-side-detection-with-history/history/
    flex/sdk/trunk/templates/client-side-detection-with-history/history/history.css
    flex/sdk/trunk/templates/client-side-detection-with-history/history/history.js
    flex/sdk/trunk/templates/client-side-detection-with-history/history/historyFrame.html
    flex/sdk/trunk/templates/client-side-detection-with-history/index.template.html
    flex/sdk/trunk/templates/express-installation/
    flex/sdk/trunk/templates/express-installation/AC_OETags.js
    flex/sdk/trunk/templates/express-installation/index.template.html
    flex/sdk/trunk/templates/express-installation/playerProductInstall.swf
    flex/sdk/trunk/templates/express-installation-with-history/
    flex/sdk/trunk/templates/express-installation-with-history/AC_OETags.js
    flex/sdk/trunk/templates/express-installation-with-history/history/
    flex/sdk/trunk/templates/express-installation-with-history/history/history.css
    flex/sdk/trunk/templates/express-installation-with-history/history/history.js
    flex/sdk/trunk/templates/express-installation-with-history/history/historyFrame.html
    flex/sdk/trunk/templates/express-installation-with-history/index.template.html
    flex/sdk/trunk/templates/express-installation-with-history/playerProductInstall.swf
    flex/sdk/trunk/templates/metadata/
    flex/sdk/trunk/templates/metadata/AC_OETags.js
    flex/sdk/trunk/templates/metadata/readme.txt
    flex/sdk/trunk/templates/no-player-detection/
    flex/sdk/trunk/templates/no-player-detection/AC_OETags.js
    flex/sdk/trunk/templates/no-player-detection/index.template.html
    flex/sdk/trunk/templates/no-player-detection-with-history/
    flex/sdk/trunk/templates/no-player-detection-with-history/AC_OETags.js
    flex/sdk/trunk/templates/no-player-detection-with-history/history/
    flex/sdk/trunk/templates/no-player-detection-with-history/history/history.css
    flex/sdk/trunk/templates/no-player-detection-with-history/history/history.js
    flex/sdk/trunk/templates/no-player-detection-with-history/history/historyFrame.html
    flex/sdk/trunk/templates/no-player-detection-with-history/index.template.html
    Removed Paths:
    flex/sdk/trunk/templates/html-templates/

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • Using javascript to copy to the clipboard in Safari

    I had an application for taking notes in IE for the windows computers at my company. It used Javascript to copy the contents of a text box to the clipboard.
    Now that we've switched to macs (and love them), this no longer works in eitehr Safari, Firefox, or Camino for the mac.
    If there is a javascript command that will let you copy a text box's contents to the clipboard that works with any of these browsers, I'd be greateful for a few pointers int he right direction.
    Thanks in advance!

    jalperin wrote:
    > Here's what I'm doing:
    >
    Using a data set observer, check for
    onPostLoad and generate the html
    > code
    >
    Using innerHTML, stuff the code into
    the appropriate <div>
    >
    Use regionName.updateContent() to
    update the region I just created
    > with the html code I generated
    >
    > Interestingly, if I take the generated source for my
    page and remove the data
    > set observer, the Spry table displays correctly with all
    the expected values.
    > This suggests to me that my generated html code is
    correct, but that there is
    > some sort of timing issue (i.e. Spry doesn't know about
    the new code I
    > generated).
    >
    > Any suggestions?
    I'd guess that it is a timing issue as well. I haven't looked
    much at the dataset capability in Spry, but it may be that the
    dataset "finds" all of the regions and code that it applies to
    before the onPostLoad event is triggered. If that is the case, then
    your generated code doesn't exist yet,and so the dataset thinks
    that there is nothing for it to apply to.
    Will the HTML that you generate change based upon the dataset
    that is actually returned? I guess I'm looking for the reason why
    the HTML is being generated when it could be in the page itself and
    avoid this issue completely.
    Danilo Celic
    |
    http://blog.extensioneering.com/
    | WebAssist Extensioneer
    | Adobe Community Expert

  • Problem in dynamically generating the file upload field

    Hello all
    I am using netbeans 5.5 and visualwebpack for my jsf project.
    i have a problem in dynamically generating the file upload field and using it.
    I have a panel say "panelA" which holds file upload fields.
    Depending upon the count value i generate the file upload field using following code snippet:
    Upload upload1 = new Upload();
    upload1.setId("upload1");
    getPanelA.getChildren().add(upload1);
    The page successfully shows up the file upload fields. While the user clicks the submit button, i have used following logic to perform upload:
    List components = getPanelA().getChildren();
    for(int i = 0; i<components.size(); i++){
    if(components.get(i) instanceof Upload){
    UploadedFile uploadedFile = ((Upload)components.get(i)).getUploadedFile();
    I am getting this UploadedFile object null.
    How can i solve this problem.

    Anyway,
    I solved the problem.
    Actually i was using label property of the upload field due to which i got null pointer exception.
    I removed the label property of the upload field and things worked as i wanted.

  • Dynamically generating file names for 2 File ( 1: 2 mapping transformation)

    Hi ,
    I have a scenario Proxy to File(FCC) with 1:2 transformation in message mapping ie 1 sender and 2 receiver interface ....
    1 Message mapping
    1 Operation mapping
    1 RD , 1 ID and 2 file receiver channels  and 2 receiver agreements.
    I need to dynamically generate the filename say abc.(first 9 characters of mesg id) and xyz.(first 9 characters of mesg id)
    I used dynamic configurations with ASMA settings, created 2 UDF assigned each of these to header node of r receiver message types.
    Here, I guess the second dynamic configuration is over writing the first dynamic configuration and hence creating only one file with xyz.(first 9 characters of mesg id)
    name .
    Need your valuable inputs
    Thanks and regards,
    Pavithra

    As dynamic configuration doesnot work in case of 1:n mapping what  you need to do is
    Create a field Filename in your source data structure
    Create a1:1 mapping between your source structure and source structure
    In that 1:1 mapping on the target structure assign UDF for file name
    Now this target structure will be used as a source structure in your next 1:2 mapping
    Under operation mapping add first the 1:1 mapping for source and then the multimapping
    regards
    Ninad

  • Dynamically generating the jnlp file

    Hi Experts,
    Im working on a project in which we launch the Eclipse RCP from the web UI (thin client).
    I want to dynamically generate the jnlp file cause I want to pass the session of the user from the web client to RCP.
    So for this i have thought of having a variable let say sessionID ,which will take value of the session
    sum thing like this...
    <application-desc main-class="com.rcp.core.HelloWorld">
    <property name="sessionID" value="$$userSessionId"/>
    </application-desc>
    But im not able to figure out how i will populate the sessionID variable.
    which class should be responsible for doing this?
    whether that class will be in the RCP code or in the Web code...i guess it is in the web code?
    Please if u can clarify these doubts then it will be great.
    Thanks
    ved

    usually you would use jsp or a servlet to generate the jnlp file.
    If you extend the JnlpDownloadServlet (found in the sample directory in the JDK) you can generate the session id.
    /Andy

  • Dynamically generating the ssrs dataset and filling the data into the dataset and binding it to ssrs report dynamically

    I have a work to do, in ssrs we are using server reports in our project. i am looking for dynamically generating the ssrs dataset and filling the data into the dataset and binding the dataset to ssrs report(RDL) dynamically.
    Getting the dataset dynamically has a solution by using Report Definition Customization Extension (RDCE), but the problem is binding that dataset to the report(RDL) dynamically was not there.
    Here is the reference for RDCE http://www.codeproject.com/Articles/355461/Dynamically-Pointing-to-Shared-Data-Sources-on-SQL#6
    I looked for binding the dataset to the report(RDL) dynamically and searched many sites but i did not get the solution. Can anyone help me here.
    Is there any custom assemblies or any Custom data processing extensions to work around. Please help.
    Thanks in advance

    Hi Prabha2233,
    Thank you for your question.
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
    Thank you for your understanding and support.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Using TVARVC to Dynamically Set the Payroll Period in Standard Reports

    Hi,
    I am trying to define the selection screen parameters for the Pay Scale Reclassification (RPIPSR00) program such that the payroll period chosen is always +1 of the current period (i.e. the next payroll period).
    I understand that I can use TVARVC to dynamically determine the field value of a selection screen variant.  The question is after I have created a variable in the table, how do I go about ensuring that the program uses the next payroll period?
    Regards,
    Augustine

    Try reading the help first: http://help.sap.com/saphelp_nw04s/helpdata/en/c0/980398e58611d194cc00a0c94260a5/content.htm
    You have to update TVARVC with the desired value - either via a batch program or manually.
    matt

  • Can not generate the passcode for wiki

    hi All,
    I am using wc11.1.1.3, I try to config wiki according to wc document, when I want to generate the passcode for wiki, the document said:
    1.Start Fusion Middleware Control Console. For information, see Section 6.1, "Displaying Fusion Middleware Control Console."
    2.Right-click the domain in which Oracle WebCenter Wiki and Blog Server is deployed. Next, select Security and then click Credentials.
    While just at this step, I got the error msg like this:
    Can not search all credentials from credential store
    JPS-01049: ??????: javax.naming.directory.InvalidSearchFilterException: invalid attribute description; remaining name 'cn=oracle.wsm.security,cn=CredentialStore,cn=portalDomain,cn=JPSContext,cn=jpsroot_wc'
    I am using oid11g as credential store, I checked oid and confirm that 'cn=oracle.wsm.security,cn=CredentialStore,cn=portalDomain,cn=JPSContext,cn=jpsroot_wc' exists.
    Does anybody has suggestion on this?
    Best regards

    Read this and this.

  • How can I automatically close a dialog box using Javascript after I click the OK button to submit it?

    How can I automatically close a dialog box using Javascript after I click the OK button to submit it? I don't want to have to X out of the dialog box after I am done.
    Thanks
    Linda

    JS can not interact with open dialogs in any way, unless it's a dialog
    created in JS using the Dialog object.
    On Thu, Jul 24, 2014 at 11:13 PM, lindaeliseruble <[email protected]>

  • We have developed a desktop application using Flash software and published the same for MAC environment. When we double click on the index.app file, the application is working perfectly in Mac 10.6.7 at our office. But if the same index.app file is double

    We have developed a desktop application using Flash software and published the same for MAC environment. When we double click on the index.app file, the application is working perfectly in Mac 10.6.7 at our office. But if the same index.app file is double clicked in Mac 10.6.7 at out clients location, its not opening. For your information the client is able to open this same application by double clicking on index.swf file. The main problem is that client is not able to open the application using index.app file at their office whereas we are able to do so at our office. Can anyone give some suggestions to sort this problem?

    The most common reason is different versions of Flash, or different versions of web browsers used.  Some users may elect to not have Flash installed at all because of the processor overhead of Flash.  If you are going to make an application for a client, check what operating system and browser versions they are using first.  Then determine if a stand alone application is required, or if they have the necessary plugins to run specific browser enhanced code.
    P.S. MAC is an acronym for Media Access Control.  Mac is the shorthand for Macintosh, the operating system and computers made by Apple Inc.

  • Using my MacBook Pro as the host for projection to my TV via AppleTV?

    Can I subscribe to HBOGO thru Apple TV and avoid cable service using my MacBook Pro as the host for projecting to my TV via AppleTV?S

    Possibly.
    Some sites such as TMN GO which is similar will not allow mirroring to take place.
    It works for about a minute then shuts down... Security settings from the site.

  • Dynamically setting the values for the Adapter Configuration in BPEL

    We are configuring the JMS adapter to put into an MQ topic. For this we are giving all the values for the configuration parameters like
    Factory Properties.
    JMS connection Factory
    Transacted
    Destination Type
    Username
    Password
    Destination Name, etc...
    and we are able to produce message on the MQ.
    Our requirement is to dynamically pass the values for the above parameters from some configuraion files(other than oc4j-ra.xml), which will have value for each obove parameters.
    Any help on this is highly appreciated.
    Regards,
    Suman

    Re: JMS Properties setup
    this thread will explain how to do it.

  • Dynamically setting the values for the Adapter Configuration

    We are configuring the JMS adapter to put into an MQ topic. For this we are giving all the values for the configuration parameters like
    Factory Properties.
    JMS connection Factory
    Transacted
    Destination Type
    Username
    Password
    Destination Name, etc...
    and we are able to produce message on the MQ.
    Our requirement to dynamically pass the values for the above parameters from some configuraion files(other that oc4j-ra.xml), which will have value for each obove parameters
    Any help on this is highly appreciated.

    Re: JMS Properties setup
    this thread will explain how to do it.

  • How to use JavaScript Zoom in on the layer

    How to use JavaScript Zoom in on the layer

    yeah, i talking about zooming in on a 3D object,do you have a solution

Maybe you are looking for

  • Can't do AirPlay Mirroring with iOS 6.

    Looks like when I try to AirPlay Mirror from my iPhone 4s to the Apple TV (3rd Generation), it tries to start it but quickly returns to the non airplay mode. This started to happen after I updated to iOS 6. Anyone has any ideas?

  • S 9 Software Development

    Hello, Does anybody have a list (or perhaps someone could compose one) of currently and/or recently developed OS 9 programs? It would be interesting to see what people are still doing with this final installment of the good old classic interface. I u

  • MDSD Print button disabled

    Hi Folks, I want to know whether To-Printer option remains enabled in standard MDSD application when we follow path OTHER3-REPORTS-2material/inventory reports-----2check-out..1..For all materials i do not get To-Printer button enabled. Even if i inst

  • Windows 7 - FN + indication disappeared - T400

    Hi there, Ive installed Win 7 from scratch (i.e. no upgrade, direct install), and Im missing some old stuff from the old OS installaiton, indicating the FN + actions. For example, when I increase the audio volume, or increase the brightness, I dont s

  • BEx RFC_ERROR_COMMUNICATION

    Dear all,   I got a funny issue when I connect to BW server in BEx. The 'Connect to SAP gateway failed' is poped up, the fun is I can connect to the same BW system via SAP GUI. I checked all the parameters for BEx, Macro,security and even the service