You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/09/17 03:36:46 UTC

DO NOT REPLY [Bug 31270] - DisptachAction discussions/proposals

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31270

DisptachAction discussions/proposals





------- Additional Comments From niallp@apache.org  2004-09-17 01:36 -------
I'm attaching a ActionDispatcher class. Suggestion on the dev list from Hubert 
Rabago that it would be better to factor out the "dispatch" logic so that there 
isn't a need for an Action to "inherit" from one of the DispatchAction flavours.

To use this class then all thats required in an Action is the following (plus 
the actual methods to be executed):

public class MyCustomAction extends Action {
    protected ActionDispatcher dispatcher
              = new ActionDispatcher(this);

    public ActionForward execute(ActionMapping mapping,
                                 ActionForm form,
                                 HttpServletRequest request,
                                 HttpServletResponse response) 
             throws Exception {

        return dispatcher.execute(mapping, form, request, response);

    }


}

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org