Announcement Announcement Module
No announcement yet.
PARAM_PAGE request attribute function Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • PARAM_PAGE request attribute function

    Hi there,

    I've been playing around with the AbstractWizardFormController and for the most part got it to work. What I didn't figure out yet is how to use the PARAM_PAGE request parameter to handle the back button in the browser. Is there anyone out there who can enlighten me (on this point).

    Gerben ten Wolde

  • #2
    I am looking to do the same thing, but can't see how to specify. Were you able to get it to work? And if so, how?



    • #3
      I've been working with this to avoid strange behaviour when using the browser's back button. It seems Spring's AbstractWizardFormController stores the current page in the session so all methods with the "int page" parameter look there unless you send the PARAM_PAGE parameter.

      PARAM_PAGE = "_page" by default.

      Using PARAM_PAGE parameter when submitting one particular step of the wizard avoids incorrect page numbering by specifying the number of the page that made request for a page change. I use it like this in the JSP:

      First page:

      <FORM method="POST" action="?_target1&_page=0">
      Second page:

      <FORM method="POST" action="?_target2=true&_page=1">
      and so on...

      This way I'm specifying two things:

      1.- What page I want (_targetX)
      2.- What page I am (_page=X)

      Now the "page" parameters in AbstractWizardFormController's methods take the value of what you specified inthe JSP.