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: TextField yearBuilt = new TextField( "yearBuilt" ).setRequired( true ); And I'm using a CompoundPropertyModel that maps "yearBuilt" to an underlying bean property. My problem is that the default value for

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: TextField yearBuilt = new TextField( "yearBuilt" ).setRequired( true ); And I'm using a CompoundPropertyModel that maps "yearBuilt" to an underlying bean property. My problem is th

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 wrote: > Hi, > > I'm creating a text field to host an integer, namely the year that a house > was built: > TextField yearBuilt

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 Haines wrote: Hi, I'm creating a text field to hos