|
Hello,
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:call> ...
<map:match
pattern="*.jxt">
<map:generate type="jxt" src=""/> <map:transform type="jxf" /> <map:transform type="xalan" src="" /> <map:serialize type="xhtml"/> </map:match> My Flow Script:
cocoon.load("resource://org/apache/cocoon/components/jxforms/flow/_javascript_/JXForm.js");
function main(form) {
// Model for the form
var model = {"name" : "foo", "password" :
"bar"};
form.setModel(model); // How to pass this var into the
template without using the setModel()???
var someVar = "Hello
Word!";
form.sendView("listUsers.jxt"); } Thank you!
Best regards
Stephan Niedermeier
|
