Menu

It's possible to Render xform on demand ?

Help
2008-04-29
2013-04-15
  • Luigi Giannini

    Luigi Giannini - 2008-04-29

    Hi all!
    I try with success to use FormFaces with another Javascript library .
    The other one lib create a table from an XML in which a cell for each rows contains a xform trigger.
    Then, naturally, the trigger is not rendered by FormFaces because that code was generated at runtime by the other one lib AFTER formfaces has just parsed and rendered the page.

    The real question:
    it's possible to call an event that forces FormFaces to parse and render the page again after page load?
    The lib i'm using have a methos to call a javascript function on table generation ending.
    But I have not idea which event/function to call.
    Otherwise I not need the xform model or instance reparse/regeneration but if there is an event capable to render the trigger 'post-generated' with the model/instance regeneration maybe good as well...

    Thanks in advance for the help
    Luigi Giannini

     
    • Hans Blink

      Hans Blink - 2008-04-30

      xform = new XForm(newXml);
                    XForm.initialize();

      Just make sure newXml is a proper xhtml xforms that is it has a html,head and body elements
      a simple example
      <html xmlns="http://www.w3.org/1999/xhtml" xmlns:form="http://www.w3.org/2002/xforms" xml:lang="en">
        <head>
          <form:model id="mdl1">
            <form:instance>
              <data xmlns="">
                <value>yellow</value>          <value>green</value>          <value>white</value>

              </data>
            </form:instance>

          </form:model>
        </head>

        <body>
      .....
      </body>
      </html>

       

Log in to post a comment.