The general idea I'm playing with now is
1) Extend ActionMappings with "request" and "actionPath" properties.
2) Extend ActionServlet to place the ActionMapping in the request
context if request=true.
3) Extend html:form to check for ActionMapping.getActionPath() when the
path is not specified.
So in struts-config you could specify
request="true"
actionPath="/insertAction"
parameter="insert"
or
request="true"
actionPath="/updateAction"
parameter="update"
and have the appropriate path automagically appear in your html:form.
The Action can then call getParameter() to determine whether it's
suppose to insert or update the ActionForm data. Viola, no hidden
fields!
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/
Chuck Stern wrote:
>
> I think this is a great idea. I can't tell you how many times I've
> dynamically loaded hidden fields to determine the "nextAction". A standard
> way of doing this would be very nice.
>
> Chuck