Try lookupDispatchAction instead of DispatchAction and have a message
resources(applicationresource.properties) for the mappings...that you
way you can achieve multiple submits as well as no need to check for the
method parameter.
You need to check for the html:submit code for that.

Regards
Amit

-----Original Message-----
From: Kunal Parikh [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 16, 2004 11:28 AM
To: Struts Users Mailing List
Subject: Re: Mapping ActionPath to a method in DispatchAction

That is EXACTLY what I've done:

Changed the last line of the execute method of dispatch action FROM

return dispatchMethod(mapping, form, request, response, name);
                                                         ^^^^
TO

return dispatchMethod(mapping, form, request, response, parameter);
                                                         ^^^^^^^^^
But, is there a more "standard" way of achieving the same functionality
?


TIA,

Kunal


On Mon, 16 Aug 2004 11:22:11 +0530, Navjot Singh
<[EMAIL PROTECTED]>  
wrote:

> 110% POSSIBLE.
>
> retreiving the paramter name and method calls using reflection and are

> already done.
> all you need to do is override the implementation and rather than  
> checking for *method* value , check for last part of URI and call the

> respective method.
>
> just change execute() method in DispatchAction. you dont have to do  
> much. just a few lines.
>
> regards
> Navjot Singh
>
> Kunal Parikh wrote:
>
>> Hi!
>>
>> I was wondering if it were possible to drop the parameter attribute
in  
>> a  dispatch action and map an actionPath to a method/methodName ?
>>
>> E.g
>>
>> /createUser -> public ActionForward createUser(ActionMapping  
>> m,ActionForm  f,HttpServletRequest req,HttpServletResponse res )
>>
>> /editUser -> public ActionForward createUser(ActionMapping  
>> m,ActionForm  f,HttpServletRequest req,HttpServletResponse res )
>>
>> /deleteUser -> public ActionForward deleteUser(ActionMapping  
>> m,ActionForm  f,HttpServletRequest req,HttpServletResponse res )
>>
>> instead of
>>
>> /userAction?method=createUser -> public ActionForward   
>> createUser(ActionMapping m,ActionForm f,HttpServletRequest   
>> req,HttpServletResponse res )
>>
>> /userAction?method=editUserUser -> public ActionForward   
>> editUser(ActionMapping m,ActionForm f,HttpServletRequest   
>> req,HttpServletResponse res )
>>
>> /userAction?method=deleteUser -> public ActionForward   
>> deleteUser(ActionMapping m,ActionForm f,HttpServletRequest   
>> req,HttpServletResponse res )
>>
>> TIA,
>>
>> Kunal
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> .
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to