Results 1 to 2 of 2

Thread: Is there a multiaction form controller or equivilent?

  1. #1
    Join Date
    Aug 2004
    Location
    St. Louis, MO
    Posts
    39

    Default Is there a multiaction form controller or equivilent?

    Similar to Struts MappingDispatchAction. The typical example is to have all operations of a shoppping cart contained within one java class. I know that there is the MultiActionController, but it doesn't seem to offer the form processing that I'm looking for (seems to be provided by BaseCommandController and it's subclasses). Does this functionality already exist or can you point me in the right direction for implementing it?

    Thanks

  2. #2
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    Actually, the MultiActionController has some form binding functionality. Look at the JavaDoc of the MultiActionController:

    * Controller implementation that allows multiple request types to be
    * handled by the same class. Subclasses of this class can handle several
    * different types of request with methods of the form
    *
    * <pre>
    * ModelAndView actionName(HttpServletRequest request, HttpServletResponse response);</pre>
    *
    * May take a third parameter HttpSession in which an existing session will be required,
    * or a third parameter of an arbitrary class that gets treated as command
    * (i.e. an instance of the class gets created, and request parameters get bound to it)
    Rod Johnson's J2EE without EJB book also discusses this, but unfortunately the Spring reference documentation does not. So I suggest you just look at the source code of the MultiActionController to find out the details.

    Erwin

Similar Threads

  1. Replies: 4
    Last Post: Sep 1st, 2010, 01:38 AM
  2. Replies: 3
    Last Post: Jun 8th, 2010, 03:27 AM
  3. Replies: 6
    Last Post: Jul 20th, 2007, 05:56 AM
  4. Replies: 0
    Last Post: Jun 10th, 2005, 08:22 AM
  5. Controller to Form Navigation?
    By cnelson in forum Web
    Replies: 1
    Last Post: Aug 20th, 2004, 06:18 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
  •