if you don't wrap your whole page in a form, and use submitlinks everywhere, you'll loose user input. Forms need to be submitted to the server to retain their input.
Much better IMO is a client side javascript that triggers a confirmation box when the user has modified some fields, being called when a link or button is clicked (or page unload is triggered). Martijn On Wed, Oct 8, 2008 at 10:48 AM, Arie Fishler <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to consult on implementing a generic mechanism for checking > whether some data on a page modified before leaving that page. > > The use case is: > - Page has some form fields or other controls > - User has entered some data to the form > - Before submitting the form user clicked on a link to leave the page (might > be a menu item or similar). > > The required action will be: > A) Check if the new page the user is going to means "no loss of data" -> > user can go back safely to his form data later on and this is considered a > valid move to another page > B) Checks if the new page "cancels" the form which means the user will lose > all his data. In this case we need to alert the user (modal window) that > moving to the new page will cause loss of data. He should approve this. > C) If he approves operation will continue. If he cancels he will go BACK to > the same page he just left with no loss of form data. > > This looks like a need to use *redirectToInterceptPage* only that if the > user cancels...I want to go back to the LAST page. How do I retrieve > programatically the previous page the user has left and go back to it? I > also need the previous page to check if the transition is "valid" which > relates to action (A) above - in such a case no warning needs to be issued > to the user > > Thanks, > Arie > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]