Hello all,

During the development of a (somewhat) generic form component, I stumbled on 
the following error:
FormComponent can't be not required when the type is primitive class: 
[MarkupContainer [Component id = formField, page = <No Page>, path = 
formField.CheckBox]]

This is caused by calling setType(Boolean.TYPE) and setRequired(false) on a 
CheckBox component. setRequired checks if the type is a primitive and throws 
an exception when an attempt is made to make the component not required for a 
primitive. Although I think this is a good thing for most components, I don't 
think this behaviour can be applied on a CheckBox, because of the (slightly) 
different interpretation of required on a CheckBox (WICKET-1221). Perhaps 
CheckBox should override setRequired to not throw the Exception? Right now, I 
am required to always check a CheckBox when I set the type to Boolean.TYPE.

Best regards,
Emond Papegaaij

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to