kent,
thank you - that was it.
Kent Tong wrote:
Jeff Emminger <mailing-lists <at> 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]