Results 1 to 2 of 2

Thread: AbstractWizardFormController - when appropriate?

  1. #1

    Default 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 at 01:51 PM.

  2. #2

    Default

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

    Code:
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •