hrm, so lets see DateTimeField:
public final boolean isRequired()
{
// prevent clients from overriding
return super.isRequired();
}
public FormComponent setRequired(boolean required)
{
dateField.setRequired(required);
return this;
}
isnt this broken? isrequired() doesnt return the same value as
setrequired().
by making setrequired nonfinal the contract you have established is: you
always have to override both setrequired and isrequired to make sure they
return the same value, or call super in setrequired. and you havent done
this just for the formcomponetpanel but you have leaked this across all
formcomponents.
i would much rather have datetimefield define the contract on its factory
method for newdatetextfield() which 99.9% of people probably wont use.
-igor
On 8/13/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
>
> > and i suppose requiring a supercall from onattach/onbeforerender/etc is
> also
> > Eeeeewww! :) but that is how it works. when you override something you
> have
> > to make sure you do it right.
>
> Well yeah, if there is no other way around. But with how it currently
> is, clients don't have to.
>
> Eelco
>