Hello,

I was playing around with the XML binding sample (form2xml.flow), when I got the following error:

"resource://org/apache/cocoon/forms/flow/javascript/Form.js",
line 171: uncaught JavaScript exception:
at form2xml (file:/Volumes/Data/Users/sjur/redtest/flow/binding_example.js, Line 39)
at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line 171):
org.apache.commons.jxpath.JXPathException: Exception trying to create xpath choose/@value;
Cannot create an attribute for path /data[1]/wrapper[1]/context[1]/info[1]/choose/@value,
operation is not allowed for this type of node


What I did:

I removed all non-required data from the data file before displaying the form, including the element 'choose'. After entering data in all fields (including setting 'choose' to true), the above error was triggered upon submitting. If I set 'choose' to false (the default/initial value when nothing was provided), I get the following error on a different node:

uncaught JavaScript exception:
at form2xml (file:/Volumes/Data/Users/sjur/redtest/flow/binding_example.js, Line 39)
at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line 171):
org.apache.commons.jxpath.JXPathException: Exception trying to set value with xpath @changed;
Cannot set property /data[1]/wrapper[1]/context[1]/ipaddress[1]/@changed,
path does not match a changeable location


The element 'ipaddress' is also not required, and was subsequently not given in the input data.

What do I need to do to be able to insert new elements using JXPath? How should the form2xml example be modified to cope with this?

Regards,
Sjur


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to