You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by boraldo <bo...@hotbox.ru> on 2009/03/19 11:59:34 UTC

s:textfield with value attribute

I thought that this attribute means only initial value, but when I submitted
my form with validation errors, on the redisplayed form I saw again that
value, not entered by me.

What for this attribute then ? And how can I set just initial value for my
form?
-- 
View this message in context: http://www.nabble.com/s%3Atextfield-with-value-attribute-tp22597841p22597841.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:textfield with value attribute

Posted by Dave Newton <ne...@yahoo.com>.
boraldo wrote:
> I thought that this attribute means only initial value, but when I submitted
> my form with validation errors, on the redisplayed form I saw again that
> value, not entered by me.
> 
> What for this attribute then ? And how can I set just initial value for my
> form?

If there's a "value" attribute on the JSP page it's going to set the 
value of the textfield every time the page is hit...

You can pre-set the action property's value and leave off the value 
attribute altogether if you want, if that's what your requirements are. 
There's no default way to know that you only want the value attribute to 
be used *sometimes*.

Dave

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