struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso" <musa...@gmail.com>
Subject Re: Submit button property in ajax not sends value to action.
Date Thu, 01 Nov 2007 19:12:21 GMT
Fixed on 2.1:

https://issues.apache.org/struts/browse/WW-1930

musachy

On 11/1/07, Vinicius Medeiros Peretti <vinicius@peretti.eti.br> wrote:
> Thanks very much, this is the way!
> But I think that the property of submit button should be posted.
>
> Thanks,
>
> Vinicius
>
> Jeromy Evans wrote:
> > I've read somewhere, but can't find the reference, that you're correct
> > that dojo doesn't post the value of the submit button with XHR.
> >
> > Instead, I always post to different methods in the action - one for
> > each submit button.
> >
> > eg.
> > <s:submit name="valueButton" theme="ajax" targets="%{target}"
> > action="SomeActionMethodA" value="some"/>
> > <s:submit name="valueButton" theme="ajax" targets="%{target}"
> > action="SomeActionMethodB" value="other"/>
> >
> > with the corresponding wildcard in struts.xml:
> >
> > <action name="SomeAction*" method="{1}"...
> >
> > and two methods in your action:
> >
> > public String methodA() {}
> > public String methodB() {}
> >
> > Hope that helps.
> >
> > regards,
> > Jeromy Evans
> >
> > Vinicius Medeiros Peretti wrote:
> >> When I submit a form, in a div using theme="ajax", the value of
> >> property of submit button not goes to Action.
> >>
> >> E.g.
> >>
> >> <s:form
> >>    action="SomeAction"
> >>    method="post"
> >>    theme="ajax"
> >>    target="%{target}">
> >>    <s:submit
> >>        name="valueButton"
> >>        theme="ajax"
> >>        targets="%{target}"
> >>        value="some"/>
> >>       <s:submit
> >>        name="valueButton"
> >>        theme="ajax"
> >>        targets="%{target}"
> >>        value="other"/>
> >> </s:form>
> >>
> >> If I click in "some" or "other", I want to get the value by
> >> getValueButton().
> >> But it not works. Any way to do this?
> >>
> >> regards,
> >> Vinicius
> >>
> >> ---------------------------------------------------------------------
> >> 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
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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


Mime
View raw message