that's auto:
public final FormComponent setType(Class type)
{
typeName = type == null ? null : type.getName();
if (type != null && type.isPrimitive())
{
setRequired(true);
}
On Mon, Apr 21, 2008 at 9:51 PM, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> You might run into problems when trying to apply the converted null.
> If you can use setRequired that would prevent null input.
> If you can't enforce that the input will never be null you could
> either override setObject of your model to catch null and "convert" it
> to a primitive or you can extend IntegerConverter and override parse
> to return something other then null. The latter option is preferable
> if you want to enforce this application wide.
>
> Maurice
>
> On Mon, Apr 21, 2008 at 9:17 PM, Michael Mehrle <[EMAIL PROTECTED]>
> wrote:
> > Actually, I just realized that the field's model is an primitive int,
> > not an Integer - I assume JDK5 auto-boxing will take care of that, or
> do
> > I have to use a converter?
> >
> > Michael
> >
> >
> >
> > -----Original Message-----
> > From: Maurice Marrink [mailto:[EMAIL PROTECTED]
> > Sent: Monday, April 21, 2008 11:36 AM
> > To: [email protected]
> > Subject: Re: Integer models for textfields?
> >
> > You can do new TextField(id, model,Integer.class) and the textfield
> > will automatically convert everything to integers.
> >
> > Maurice
> >
> > On Mon, Apr 21, 2008 at 8:25 PM, Michael Mehrle <[EMAIL PROTECTED]
> >
> > wrote:
> > > Do, I have to set up a converter for textfields that use integers as
> > > models? Or is that being converted implicitly?
> > >
> > >
> > >
> > > Michael
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>