You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mjw_85uk <mj...@hotmail.com> on 2008/06/23 11:51:24 UTC

s:submit name attribute problem

hi,

i am having a problem with the name attribute of s:submit tag.  I may be
using it in the wrong context as i am farily new to Struts 2.  My problem is
that i want to set a property of a class with the value of the submit
button, which i assume would be "submit".  The problem is that the property
is not set and has a value of null when the submit button is pressed. My
code is below:

JSP Page:

<s:submit name="action" action="Submit" method="getReport" value="Submit"/>

Class:

private String action;

Can anyone assist me in my problem?


many thanks
mark

-- 
View this message in context: http://www.nabble.com/s%3Asubmit-name-attribute-problem-tp18065958p18065958.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: s:submit name attribute problem

Posted by Lukasz Lenart <lu...@googlemail.com>.
Hi,

> <s:submit name="action" action="Submit" method="getReport" value="Submit"/>

Just look for source of your page and you will see why. If you want to
use either method or action (not both), maybe it will be better to add
hidden field?


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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