I remember hitting my head against a wall on this when learning Tapestry. I 
just did it again with a new developer the other day. I wish they'd 
deprecate isInError and give it a better name like 
isCurrentComponentInError. I don't really know much about managing an API 
like Tapestry's, though, so that might not be possible.

chris

On 7/7/05, Jeff Emminger <[EMAIL PROTECTED]> wrote:
> 
> kent,
> thank you - that was it.
> 
> Kent Tong wrote:
> > Jeff Emminger <mailing-lists <at> 
> > jeffemminger.com<http://jeffemminger.com>> 
> writes:
> >
> >
> >>i have a Form with two fields, "title" and "description". leaving the
> >>form blank and submitting, i have found that the ValidationDelegate
> >>incorrectly reports no errors when using a ValidField and a TextArea,
> >>but works correctly using a ValidField and a ValidTextArea (from
> >>http://www.clever.co.nz/).
> >>
> >>i want to require the "title" field but leave the "description"
> >>optional. am i doing this wrong?
> >>
> >>public void onSubmit(IRequestCycle cycle) {
> >> IValidationDelegate delegate = (IValidationDelegate)
> >>getBeans().getBean("delegate");
> >>
> >> if (!delegate.isInError()) {
> >> // do stuff
> >> }
> >>}
> >
> >
> > You should call getHasErrors(), not isInError(). The latter is talking
> > about the current component. There is a more detailed description
> > on the validation delegation in chapter 4 (free download) of my book.
> >
> > --
> > Author of an e-Book for learning Tapestry (
> http://www.agileskills2.org/EWDT)
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Reply via email to