TextField hosting an Integer

2010-03-22 Thread Steven Haines
Hi, I'm creating a text field to host an integer, namely the year that a house was built: TextFieldInteger yearBuilt = new TextFieldInteger( yearBuilt ).setRequired( true ); And I'm using a CompoundPropertyModel that maps yearBuilt to an underlying bean property. My problem is that the

Re: TextField hosting an Integer

2010-03-22 Thread Thierry Peng
Steven Haines schrieb: Hi, I'm creating a text field to host an integer, namely the year that a house was built: TextFieldInteger yearBuilt = new TextFieldInteger( yearBuilt ).setRequired( true ); And I'm using a CompoundPropertyModel that maps yearBuilt to an underlying bean property. My

Re: TextField hosting an Integer

2010-03-22 Thread James Carman
Change your property to Integer and not int? That way, it can be null (which would show up as empty on the text field). On Mon, Mar 22, 2010 at 11:09 AM, Steven Haines lyg...@yahoo.com wrote: Hi, I'm creating a text field to host an integer, namely the year that a house was built:

Re: TextField hosting an Integer

2010-03-22 Thread Swanthe Lindgren
And add RangeValidator. //Swanthe On 2010-03-22 17:00, James Carman wrote: Change your property to Integer and not int? That way, it can be null (which would show up as empty on the text field). On Mon, Mar 22, 2010 at 11:09 AM, Steven Haineslyg...@yahoo.com wrote: Hi, I'm creating a