You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Steven Hansen <ru...@berkeley.edu> on 2009/05/01 00:14:57 UTC

Re: Struts 2: Redisplaying Invalid Form and Displaying Errors

Thanks Dave,

Your suggestion fixed it!

Best,
Steven



Dave Newton wrote:
> Steven Hansen wrote:
>> The next problem, is that if I don't enter a value for the Age field 
>> (int), when the form is redisplayed the Age field has been populated 
>> with 0.  If the Age field is left empty, I'd like the field to stay 
>> empty when the form is redisplayed.
>
> Use Integer, not int: the default value for an "int" is 0; the default 
> value for an Integer is null. The form field will display the value of 
> the property.
>
> (Not sure about the first one and can't check now.)
>
> Dave
>
>
> ---------------------------------------------------------------------
> 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