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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to