struts2 newbie question 2007-02-08 - By Dave Newton
Back --- Dale Newfield <Dale@(protected)> wrote: > Dave Newton wrote: > > http://cwiki.apache.org/WW/submit.html > > Submit takes both action and method parameters; > > perhaps that's what you're looking for? > > The example makes me think that the method attribute > enables the ability to specify "get" vs. "post" on a
> submit button by submit button basis > within a single form (presumably via javascript).
Hrm. Did you try it? I didn't actually see an example on the http://cwiki.apache.org/WW/submit.html page that used <s:submit.../>'s 'method' attribute.
Anyway, setting the 'method' attribute allows you to choose which method in the form's action is run, like the docs say.
<s:form action="submitTests" method="post"> <s:submit/> <s:submit method="sub1"/> </s:form>
Naked submit: 2007-02-08 07:32:29,437 DEBUG s2samples.forms.SubmitTestsAction.execute:31 - Enter.
Method attribute set: 2007-02-08 07:29:36,328 DEBUG s2samples.forms.SubmitTestsAction.sub1:20 - Enter.
Dave
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ______ __ __ Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|