----- Original Message -----
Sent: Monday, November 03, 2003 9:36
AM
Subject: JXForm flow issue with request
parameters
Hi,
I am trying to create a wizard using JXForm. I
have the following funtion in the flow:
"function flowhandler(form) {
var username =
cocoon.request.get("username");
var model =
aBean.getModel(username);
form.setModel(model);
form.sendView("xdocs/personal_details.xml");
form.sendView("xdocs/current_enrolment.xml");
form.finish("xdocs/end.xml");
}
"
and the sitemap as follows:
" ...
<map:match
pattern="new/">
<map:call
function="jxform">
<map:parameter name="function"
value="flowhandler"/>
<map:parameter name="id"
value="form-feedback"/>
<map:parameter name="validatorNamespace" value="http://www.ascc.net/xml/schematron"/>
<map:parameter name="validatorSchema"
value="scripts/schematron.xml"/>
<map:parameter
name="username"
value="{request-param:username}"/>
</map:call>
</map:match>
....
"
Now, when I call the sitemap with http://localhost:8080/myapp/new/?username=john (I
do this from another page actually), everything is displayed correctly in the
first view (xdocs/personal_details.xml), but as soon as I press next on the
page, I get the following error in the browser:
"
* There are [1] errors. Please fix these errors and submit the
form again.
* No pointer for xpath: username
"
What am I doing wrong? And, if I cannot use
cocoon.request.get(), to obtain the username, how should I do it?
Many thanks for helping,
Alex