Here's what I have in my code:

TextField<Integer> lAdaptingHitCountThreshold = new TextField<Integer>(
"AdaptingHitCountThreshold", new PropertyModel<Integer>( lMcsConfig,
"Adapting.HitCountThreshold" ) );

lForm.add( lAdaptingHitCountThreshold.setRequired( false ) );

But when I execute it, if I do not enter any value in the field, I keep
getting the message "Field 'AdaptingHitCountThreshold' is required."
Why? In my pojo data object (lMcsConfig), the field is really of type "int",
but it is not required.

Is there a simple way to make this work? Other than creating my own model?

Thierry

Reply via email to