On 8/12/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
>
> Ok, one more reply then.
>
> > >But for DateTimePanel for instance, the check should pass if there is
> any
> > input for the date text field; the time- and AM/PM fields can be
> >ignored.
> >
> > great, so datefield { isrequired() { return fcp.isrequired()}}, the
> other
> > fields are simply not required. everything works without any magic.
>
> I considered that as well, but unfortunately that only works when
> you're in full control of all child components. But DateField and
> DateTimeField both have newDateTextField which is a factory method
> that clients can override. So much for that.there are two choices here - either you document it and let them know they have to properly implement isrequried() in their components - there is absolutely nothing wrong with that! or if you want to be nice you can do it for them in onattach() instead of in setrequired(). with our new lifecycle in 1.3 first onattach() is called then form.process() so it should always be in sync. See, we can keep bouncing back and forth. I'm ok with the solution we > have now (removed final from setRequired). I did override isRequired > on the panels where I did override setRequired, so that's tight now. i dont know if i like setrequired() open. what do others think? -igor Eelco >
