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 2003/03/14 17:59:41 UTC

DO NOT REPLY [Bug 18002] New: - [RFE] LookupDispatchAction doesn't handle Cancel or Default parameter

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18002

[RFE] LookupDispatchAction doesn't handle Cancel or Default parameter

           Summary: [RFE] LookupDispatchAction doesn't handle Cancel or
                    Default parameter
           Product: Struts
           Version: Nightly Build
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Standard Actions
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: lquijano@hotpop.com


It would be useful that LookupDispatchAction had a "default" handler and a
"cancel" handler.

This way, we could avoid overriding execute() like this:

public ActionMapping execute(...) {
   if(isCancelled(request)) {
       doCancel(...);
   }
   else if(request.getParameter(paramName)) {
       doDefault(...);
   }
   else {
       super.execute(...);
   }
}

Even worse, using "request.getParameter" makes the action dependent on the fact
that the action to take is defined by a request parameter, thus exposing the
internals of LookupDispatchAction. 

I noticed that DispatchAction *does* have an unspecified(...) method that could
be overriden. But LookupDispatchAction doesn't use that code. Maybe a little
refactoring is needed?

And neither one has a cancel handler.

BTW... the default handler is *very* important, because IE 5 has a serious bug
(i think) where it sends *nothing* as submit button's value if the user presses
Enter instead of clicking the button.

Leonardo

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