Results 1 to 2 of 2

Thread: Form Controllers - navigating to a new view

  1. #1
    Join Date
    Sep 2004
    Posts
    9

    Default Form Controllers - navigating to a new view

    When a form controller (either SimpleFormController or a custom subclass of AbstractFormController) processes a form submission successfully and needs to navigate to a different view, how is initialisation for the new view best performed?

    The new view would typically have its own controller for handling new form requests, initialising reference data, processing submissions, etc.

    Ideally the first controller would somehow invoke the "new form" workflow documented in AbstractFormControler for the second form (to initialise reference data, etc) before rendering the view.

    How is this normally done? (I don't think AbstractWizardFormController is relevant here as I'm not necessarily dealing with a sequence of actions that has a defined start and finish.)

    Thanks in advance ...

    Steve

  2. #2
    Join Date
    Aug 2004
    Posts
    29

    Default

    Check out the javadocs of UrlBasedViewResolver:
    Code:
     * <p>As a special feature, redirect URLs can be specified via the "redirect&#58;"
     * prefix. E.g.&#58; "redirect&#58;myAction.do" will trigger a redirect to the given
     * URL, rather than resolution as standard view name. This is typically used
     * for redirecting to a controller URL after finishing a form workflow.
     *
     * <p>Furthermore, forward URLs can be specified via the "forward&#58;" prefix. E.g.&#58;
     * "forward&#58;myAction.do" will trigger a forward to the given URL, rather than
     * resolution as standard view name. This is typically used for controller URLs;
     * it is not supposed to be used for JSP URLs - use logical view names there.
    or take a look at the springworkflow system (http://dev.competities.com) that handles redirecting and forwarding and defining the possible workflows in a central xml file and handles the navigation programming for the flows.

    Gr
    Ronald

Similar Threads

  1. Replies: 3
    Last Post: Jun 8th, 2010, 03:27 AM
  2. Replies: 9
    Last Post: Nov 1st, 2005, 10:36 PM
  3. Replies: 3
    Last Post: Apr 29th, 2005, 06:09 AM
  4. Portlet Form Controllers
    By johnalewis in forum Web
    Replies: 4
    Last Post: Mar 11th, 2005, 10:26 AM
  5. URI fragments in form controllers workflow
    By PetrMatulik in forum Web
    Replies: 0
    Last Post: Mar 9th, 2005, 09:36 AM

Posting Permissions

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