xforms:switch keep state

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

xforms:switch keep state

Pepijn Noltes
Hi,
 
I'm using xforms:switch to show/hide some content for the user.
 
But if I submit this form to process it server-side, it will come back with the xforms:switch state resetted (as aspected).
Is there any simple way (without the need to create a xml instance for show/hide administration) to remember the xforms:switch selected cases ?
 
 
Thanks,
 Pepijn
 


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
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
Reply | Threaded
Open this post in threaded view
|

Re: xforms:switch keep state

Erik Bruchez
Administrator
Pepijn,

If you use a submission with replace="none" or replace="instance", then
the page will not reload, and the state of your xforms:switch'es will be
kept. Now if you use replace="all" (the default), which in fact loads a
new page from the server, then the state is lost, and as you say there
is no other than manually trying to restore the state of those switches.

If you are submitting data and immediately returning to the same page, I
would advise against using replace="all". The BizDoc example, and our
new upcoming Forms example illustrate for example how you can save
documents and produce resulting status messages without reloading the
page. This is the beauty of XForms and Ajax :-)

-Erik

Pepijn Noltes wrote:

> Hi,
>  
> I'm using xforms:switch to show/hide some content for the user.
>  
> But if I submit this form to process it server-side, it will come back
> with the xforms:switch state resetted (as aspected).
> Is there any simple way (without the need to create a xml instance for
> show/hide administration) to remember the xforms:switch selected cases ?
>  
>  
> Thanks,
>  Pepijn



--
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