You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Garner Shawn <sh...@gmail.com> on 2006/10/03 17:55:12 UTC

[s2] calling defferent methods in action on submit button press

I'm trying to calldefferent methods in action on button press.
I filled out the action attribute on the s:submit buttons to be
myAction!update myAction!add myAction!delete which I'm expecting it to
call the add, update, and delete methods in my action.  Is this all I
need to do because I'm getting an exception and I'm not sure if it's
related or not.

Shawn

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [s2] calling defferent methods in action on submit button press

Posted by Tom Jerry <to...@gmail.com>.
how about use of MappingDispatchAction ?

On 10/3/06, Don Brown <do...@gmail.com> wrote:
>
> If you want to call a different method on an action, use the "method"
> attribute:
>
> <s:submit action="myAction" method="update"/>
>
> Don
>
> On 10/3/06, Garner Shawn <sh...@gmail.com> wrote:
> > I'm trying to calldefferent methods in action on button press.
> > I filled out the action attribute on the s:submit buttons to be
> > myAction!update myAction!add myAction!delete which I'm expecting it to
> > call the add, update, and delete methods in my action.  Is this all I
> > need to do because I'm getting an exception and I'm not sure if it's
> > related or not.
> >
> > Shawn
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: [s2] calling defferent methods in action on submit button press

Posted by Don Brown <do...@gmail.com>.
If you want to call a different method on an action, use the "method" attribute:

<s:submit action="myAction" method="update"/>

Don

On 10/3/06, Garner Shawn <sh...@gmail.com> wrote:
> I'm trying to calldefferent methods in action on button press.
> I filled out the action attribute on the s:submit buttons to be
> myAction!update myAction!add myAction!delete which I'm expecting it to
> call the add, update, and delete methods in my action.  Is this all I
> need to do because I'm getting an exception and I'm not sure if it's
> related or not.
>
> Shawn
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org