I'm making the transition from 2.8 to 3.0 and have a
problem I don't know how to solve and don't see any examples of (probably missed them). Given a simple model like: <instance> <types> <item id="x" label="X" /> <item id="y" label="Y" /> </types> <action /> </instance> And a select1 like: <xforms:select1 ref="action" appearance="full"> <xforms:itemset nodeset="/instance/types/item"> <xforms:label ref="@label"/> <xforms:value ref="@id"/> </xforms:itemset> </xforms:select1> Depending on the user's selection, I want them to go to a different page: if she chooses "X", she gets the X page; if "Y", she gets the Y page. But now I don't know how to work this logic with the required submission: <xforms:submit submission="??"> <xforms:label>Submit</xforms:label> <xforms:setvalue ref="action">???</xforms:setvalue> </xforms:submit> In 2.8 this logic was handled by the page flow: whatever value was set in <action> directed the app to the proper page. I don't see how this works now given the requirement for submissions. Is there a logic for choosing between submissions based on user input? Currently my view is a static XHTML page. I considered making it an XSLT, but couldn't see how that would solve the problem. Thanks, Don __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- 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
|
Don Smith wrote:
> But now I don't know how to work this logic with the > required submission: > > <xforms:submit submission="??"> > <xforms:label>Submit</xforms:label> > <xforms:setvalue ref="action">???</xforms:setvalue> > </xforms:submit> > > In 2.8 this logic was handled by the page flow: > whatever value was set in <action> directed the app to > the proper page. I don't see how this works now given > the requirement for submissions. Is there a logic for > choosing between submissions based on user input? > > Currently my view is a static XHTML page. I considered > making it an XSLT, but couldn't see how that would > solve the problem. You can still use the mechanism in the PFC. Since your xforms:select1 is storing the value into <action/> already, you don't have to use an xforms:setvalue. But you do need to have an xforms:submission element in your XForms model in addition to the xforms:submit control. You have other options: 1. You can use xforms:load and compute the path to the new page with XPath. 2. You can use an xforms:submission with GET, and appropriately populate the instance to submit so that the GET parameters match what you want. -Erik -- 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 |