struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 16104] New: - default handler parameter value for LookupDispatchAction
Date Wed, 15 Jan 2003 11:36:23 GMT
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=16104>.
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=16104

default handler parameter value for LookupDispatchAction

           Summary: default handler parameter value for LookupDispatchAction
           Product: Struts
           Version: 1.1 Beta 3
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Controller
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: issues.apache.org@mekenkamp.com


The org.apache.struts.actions.LookupDispatchAction is very useful for GET as
well as POST actions. It would imho be even more useful if there was some sort
of default value for the dispatch parameter. I think it is best to illustrate
with an example:

The class that extends LookupDispatchAction contains this map:

    map.put("button.empty", "empty");
    map.put("button.read", "read");
    map.put("button.write", "write");
    map.put("button.delete", "delete");
    map.put("new", "empty");
    map.put("read", "read");
    map.put("write", "write");
    map.put("delete", "delete");

Most common operations are when users view the 'view' page; they get there
through <a href="http://localhost/app/view.do?item=224&action=read"> and similar
links on an overview page listing all items.

In the current situation if one replaces 'map.put("read", "read");' with
'map.put(null, "read");' to imply that "read" is the default function, and
leaves out the 'action=read' there is a ServletException thrown. This exception
is not thrown on '?item=224&action' (no '=<value>'  after 'action'); in fact,
the LookupDispatchAction.execute() does exactely what I would like, i.e. call my
read() method. It would be nice if '&action' could be left out as well.

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


Mime
View raw message