Hi,
I've got a page with a default-submission like so: <page path-info="/edit" default-submission="default-submission.xml" view="view.xhtml"> <action ....go to next page/> </page> The default-submission file has got two fields: <form> <field1/> <field2/> </form> In the model of the view there is a binding: <xforms:bind nodeset="/form/field2" relevant="/form/field1[. = 'true']" /> Field1 is a select1, that can have the value true or false. If it is true, field2 has to be shown (this is an input). This works correctly. However, when going to the next page when field1=false, the empty field2 element is removed from the input:instance (the xforms-instance-inspector shows me this). We have a 'back'-button on the second page and if you go back to the first page, changing field1 to true will no longer show field2, because the corresponding element is missing from the input:instance. Why is the field2 element removed from input:instance? Is this a bug? Regards, Wouter Zelle -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Wouter,
This is a feature. According the XForms specification, non-relevant nodes are pruned from the instance before submission. You can add the attribute relevant="true" to your <xforms:submission> to make sure that non-relevant nodes are sent. Alex |
Hi Alex,
That didn't work, but relevant="false" did. Kind of weird that they didn't use the attribute name 'strip-relevant', which would be less confusing. Anyway, it works, so thanks for your help. Regards, Wouter Zelle ~Java Developer~ Iprofs BV. www.iprofs.nl On Wed, Jun 24, 2009 at 23:22, Alessandro Vernet <[hidden email]> wrote:
-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Wouter,
That is right: I should have said that you need to use relevant="false". And indeed, I completely agree: the name is quite confusing! Alex |
Free forum by Nabble | Edit this page |