Removing the page is throwing the following exception:

Caused by: java.lang.IllegalStateException: Cannot remove [Page class = com.individual.registration.RegisterationPage, id = 6, version = 0] from null parent!
   at org.apache.wicket.Component.remove(Component.java:1896)

What I have is 3 pages. Page 1 has a form component, Page 2 has another form components, and Page 3 is has a label component. After submitting the form on page 1 the user will be directed to page 2 and after submitting the form the user will be directed to page 3. What I want to prevent the user from using the browser back button after submitting the form. The user should get the page has been expired.

I tried getPageMap().clear(); after setResponsePage(page); in onSubmit() but nothing happen. Then I tried getPage().remove(); I got the exception mentioned earlier. Please help me.

Regards,
Suad


Johan Compagner wrote:
call remove page then the page is gone and can't be reconstructed anymore
Ofcourse people can still use the back button (if the url did change from
the first to the second page)
and when they do that they will get a page expired.
Or maybe on the second page you have some javascript that clears the window
history somehow.

johan



On 10/25/07, Suad AlShamsi <[EMAIL PROTECTED]> wrote:
Your right, actually what I need is to stop the browser back button, which
means I need to disable the default second cache, writting to the file
system. How can I do so.

Another question, what is a temporary session, how can been created, when
to use it?

Johan Compagner wrote:

you go to another page so the previous page is not in the session anymore
(wicket 1.3)



On 10/24/07, Suad AlShamsi <[EMAIL PROTECTED]> wrote:
Hi All,
   After submitting a form the input data will be persisted in the
database and the user  will be directed to another page. How can I clear

the input data from the session?!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Reply via email to