Can somebody tell me the easiest way to achieve the following - I have a page with an xform and a map on the screen. When the user clicks on the map I call an XPL pipeline to get the post code form the co-ordinate. I want to store the post code so that when I submit the xform the post code is in the request along with the other parameters that the user has entered. Currently I have done the postcode lookup using a submission with replace="instance" and putting the result into a names instance "post-code" however when I do my xforms submission it sends the main instance which doesn't have post code in it. My first guess of how to do this is to replace the main instance and ensure that my XPL preserves all the bits it is not changing but it seems too much work. (I think this might be how the old non-switch wizard worked which doesn't seem to exist in the examples any more - which makes me think it isn't a good way of doing it) Looking at the shopping cart example I was wondering whether to store my post code in a session variable, but I'm not sure whether I can also get the pipeline that does this to return the post-code for display. If I do this then when my main instance is submitted it will get the post code details from the session variable to add to the other xform parameters. Richard Shaw ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤ Richard Shaw
Atkins Highways and Transportation
Tel: +44 (0) 1372 756407
The ultimate parent company of the Atkins Group is WS Atkins plc. Registered in England No. 1885586. Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW. P Consider the environment. Please don't print this e-mail unless you really need to. -- 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
|
Richard,
> Can somebody tell me the easiest way to achieve the following - > > I have a page with an xform and a map on the screen. When the user > clicks on the map I call an XPL pipeline to get the post code form the > co-ordinate. How do you call the XPL from the click? > I want to store the post code so that when I submit the xform the > post code is in the request along with the other parameters that the > user has entered. In other words, so that the post code is in the instance you submit? > Currently I have done the postcode lookup using a submission with > replace="instance" and putting the result into a names instance > "post-code" however when I do my xforms submission it sends the main > instance which doesn't have post code in it. > > My first guess of how to do this is to replace the main instance and > ensure that my XPL preserves all the bits it is not changing but it > seems too much work. (I think this might be how the old non-switch > wizard worked which doesn't seem to exist in the examples any more - > which makes me think it isn't a good way of doing it) I see. You can, upon receiving xforms-submit-done for the submission that gets the post code, use xforms:setvalue to copy over just the post code to your main instance. That sounds quite easy. > Looking at the shopping cart example I was wondering whether to > store my post code in a session variable, but I'm not sure whether I > can also get the pipeline that does this to return the post-code for > display. If I do this then when my main instance is submitted it > will get the post code details from the session variable to add to > the other xform parameters. I wouldn't use the session just to pass parameters as that is usually a good way to confuse users when they open new windows at the wrong moment ;-) -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.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 |
Free forum by Nabble | Edit this page |