struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <>
Subject RE: LookupDispatchAction
Date Tue, 14 Jan 2003 20:53:44 GMT

> So i guess all i need do is check the request object for my parameter as
> in the URL of the href???
> protected Map getKeyMethodMap(ActionMapping mapping,
>     ActionForm form,
>     HttpServletRequest request) {
>  Map map = new HashMap();
>   map.put("button.add", "add");
>   map.put("button.delete", "delete");
>   return map;
> }

Check it for what?  That's what LookupDispatchAction does for you.  It
figures out what method to call.  I use it, but I had to override the
execute method to provide a default behavior, otherwise it blows up if the
specified parameter isn't present.

In your first message you asked about submitting the form with a link.  If
that one parameter is the only one you need, fine, you can specify it at the
end of the link.  But you can't "submit a form" with a link and expect all
of the form elements to get sent to the server.  (Barring the use of
JavaScript, anyway!)

Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message