On 4/9/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
All form components now have a method 'setRequired'. This tells
whether the component must have a value != null (or empty string) or
not. The DDC has a set of methods that deal with the same stuff:
 - isNullValid() / setNullValid(boolean nullValid)

This can be replaced with 'isRequired/setRequired'. Any objections to
deprecating them, replacing the contents with "return !isRequired();"
and "setRequired(!nullValid)", and making them final?

I just rolled back the change and improved the javadocs a bit.

Though at first sight it looks like the nullValid and required
booleans are about the same things, they aren't really. The required
boolean says whether setting a null value on the model is permitted,
whereas nullValid says whether the null option (typically displayed as
'choose one') is displayed or whether the first available choice is
displayed in case there is no current selection.

The name can be improved though. I think is/setNullValid doesn't
communicate very clearly what it does.

Eelco

Reply via email to