Hi all,
have you implemented features of XForms 1.1 in ops? For example: <submission relevant="false()" ../> its important for me, cause I need to submit the hole instance, non-relevant nodes too. If yes, what else is implemented? If no, how can I submit non-relevant nodes without <submission relevant="false()"/>? Thanks Clemens -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Clemens,
I don't think we have implemented anything from XForms 1.1 at this point except some support for the "mediatype" attribute on xforms:output: http://www.orbeon.com/ops/doc/reference-xforms-ng#d18291e3698 Note that XForms 1.1 is still very much in flux, and it is as of yet hard to determine what of the current draft will make it into a final recommendation. However there are features of XForms 1.1 that will likely make it, and that we should implement over time, and I think that the "relevant" attribute on xforms:submission is one of them. I enter a bug to track this: http://www.orbeon.com/blog/2006/01/18/orbeon-presentationserver-30-final-released/ In the meanwhile, you can probably trick the system by making everything relevant before doing xforms:send, and restoring upon xforms-submit-done or xforms-submit-error. You could do this with xforms:setvalue of a special value in a control instance, value which you then use in your XPath expressions for your "relevant" expressions. -Erik [hidden email] wrote: > Hi all, > have you implemented features of XForms 1.1 in ops? > For example: <submission relevant="false()" ../> > its important for me, cause I need to submit the hole instance, non-relevant nodes too. > > If yes, what else is implemented? > > If no, how can I submit non-relevant nodes without <submission relevant="false()"/>? > > Thanks Clemens -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi Eric,
I have build an example which do what I want. <?xml version="1.0" encoding="ISO-8859-1"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events"> <head> <title>hello</title> <xforms:model> <!-- main-instance--> <xforms:instance id="main-instance" xmlns=""> <data> <name /> <surename /> </data> </xforms:instance> <!-- main-instance bindings--> <xforms:bind nodeset="instance('main-instance')"> <xforms:bind nodeset="name" required="true()" /> <xforms:bind nodeset="surename" relevant="instance('submitpending')='1' or ../name = 'test' " /> </xforms:bind> <!-- main-instance submissions--> <xforms:submission id="debug" action="../jsp/debug-instance.jsp" method="post" encoding="ISO-8859-1" ref="instance('main-instance')"> <xforms:setvalue ref="instance('submitpending')" ev:event="xforms-submit">1</xforms:setvalue> <xforms:setvalue ref="instance('submitpending')" ev:event="xforms-submit-error">0</xforms:setvalue> </xforms:submission> <!--control-instance--> <xforms:instance id="submitpending" xmlns=""> <flag>0</flag> </xforms:instance> </xforms:model> </head> <body> <xforms:group appearance="full" ref="instance('main-instance')"> <xforms:label>Hello</xforms:label> <xforms:input ref="name"> <xforms:label>Name</xforms:label> <xforms:alert>Please put your name here</xforms:alert> <xforms:hint>Please input your name into this field</xforms:hint> </xforms:input> <xforms:input ref="surename"> <xforms:label>surename</xforms:label> <xforms:alert>Please put your name here</xforms:alert> <xforms:hint>Please input your name into this field</xforms:hint> </xforms:input> <xforms:group appearance="minimal"> <xforms:trigger> <xforms:label>Debug</xforms:label> <xforms:send submission="debug" /> </xforms:trigger> <xforms:trigger> <xforms:label>Reset</xforms:label> <xforms:action> <xforms:reset /> </xforms:action> </xforms:trigger> </xforms:group> </xforms:group> </body> </html> Currently I tried this example only on chiba, but I think it should also work on ops. Thanks Clemens -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Clemens,
Just one comment about your example: it looks like Chiba works without this, but in fact as I read the XForms spec you do need ev:event="DOMActivate" on your actions within an xforms:trigger, otherwise the actions won't be executed. Independently from the XForms engine, you may also want to catch xforms-submit-done and reset your flag to 0 in that case too. Other than that the example works great with OPS, ajudsting for your submission action :-) -Erik [hidden email] wrote: > Hi Eric, > > I have build an example which do what I want. > > <?xml version="1.0" encoding="ISO-8859-1"?> > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:ev="http://www.w3.org/2001/xml-events"> > <head> > <title>hello</title> > <xforms:model> > <!-- main-instance--> > <xforms:instance id="main-instance" xmlns=""> > <data> > <name /> > <surename /> > </data> > </xforms:instance> > <!-- main-instance bindings--> > <xforms:bind nodeset="instance('main-instance')"> > <xforms:bind nodeset="name" required="true()" /> > <xforms:bind nodeset="surename" relevant="instance('submitpending')='1' or ../name = 'test' " /> > </xforms:bind> > <!-- main-instance submissions--> > <xforms:submission id="debug" action="../jsp/debug-instance.jsp" method="post" encoding="ISO-8859-1" ref="instance('main-instance')"> > <xforms:setvalue ref="instance('submitpending')" ev:event="xforms-submit">1</xforms:setvalue> > <xforms:setvalue ref="instance('submitpending')" ev:event="xforms-submit-error">0</xforms:setvalue> > </xforms:submission> > <!--control-instance--> > <xforms:instance id="submitpending" xmlns=""> > <flag>0</flag> > </xforms:instance> > </xforms:model> > </head> > <body> > <xforms:group appearance="full" ref="instance('main-instance')"> > <xforms:label>Hello</xforms:label> > <xforms:input ref="name"> > <xforms:label>Name</xforms:label> > <xforms:alert>Please put your name here</xforms:alert> > <xforms:hint>Please input your name into this field</xforms:hint> > </xforms:input> > <xforms:input ref="surename"> > <xforms:label>surename</xforms:label> > <xforms:alert>Please put your name here</xforms:alert> > <xforms:hint>Please input your name into this field</xforms:hint> > </xforms:input> > <xforms:group appearance="minimal"> > <xforms:trigger> > <xforms:label>Debug</xforms:label> > <xforms:send submission="debug" /> > </xforms:trigger> > <xforms:trigger> > <xforms:label>Reset</xforms:label> > <xforms:action> > <xforms:reset /> > </xforms:action> > </xforms:trigger> > </xforms:group> > </xforms:group> > </body> > </html> > > Currently I tried this example only on chiba, but I think it should also work on ops. > > Thanks > Clemens -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |