Announcement Announcement Module
No announcement yet.
AbstractWizardFormController - when appropriate? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • AbstractWizardFormController - when appropriate?

    I have various pages that will bind to the same object, however some of the pages may vary depending on certain criteria. For instance, on one page some form fields are not displayed depending on the user. I want to include the user in the model but how can I do this since it looks like it just shows the next JSP page specified? Do I have to override the processFormSubmission method? Or any parameters I may have to pass?

    For instance, displayTextDetail.jsp?sectionNumber=3
    How do I pass those parameters?
    Last edited by smiles78; Oct 6th, 2008, 01:51 PM.

  • #2
    You can determine what page is displayed next using the getTargetPage method. A very basic one follows:

    protected int getTargetPage(HttpServletRequest request, Object command, Errors errors, int currentPage) {
      if (currentPage == 0 ) return 1;
      return 0;
    Then, you can get the user from the request, and apply any conditionals you wish in determining which page displays next.