cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Niedermeier" <>
Subject JXForms+JXTemplates: Passing values
Date Sat, 06 Sep 2003 14:51:47 GMT

I want to use JXForms for data binding and JXTemplate for displaying "non-form-datas". Is
there a way to pass other values to the template over my Flow Script using the function form.sendView("target")?
Now it seems to me, that only the form model can be passed to the template.

My Sitemap has the following lines:

<map:match pattern="">
      <map:call function="jxform">
        <map:parameter name="function" value="main"/>
        <map:parameter name="id" value="myForm"/>
<map:match pattern="*.jxt">
      <map:generate type="jxt" src="documents/templates/{1}.jxt"/>
      <map:transform type="jxf" />
      <map:transform type="xalan" src="stylesheets/jxforms2html.xsl" />
      <map:serialize type="xhtml"/>

My Flow Script:


function main(form) {

  // Model for the form
  var model = {"name" : "foo", "password" : "bar"};

  // How to pass this var into the template without using the setModel()???
  var someVar = "Hello Word!";

Thank you!

Best regards
Stephan Niedermeier

View raw message