You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Antares on Wheels <an...@gmail.com> on 2005/11/07 21:47:52 UTC
Creating a validatable component
Hi,
I've created a component that includes two drop-down lists. The user
is expected to select a value from both lists. Otherwise, the input
is considered invalid.
I have implemented this by inheriting from BaseComponent. But I am
having trouble with the validation. How can I set it so that
validation follows the aforementioned all-or-nothing rule?
Are there any interfaces that the component needs to implement --
e.g., ValidatableField? I've tried that, but my validation delegate
refuses to recognize the new component (it says something like, "the
fieldName property must not be null").
Is there a way to have my component return a single value (e.g.,
"val1|val2") that could then by picked up by a StringValidator? Are
there any methods or interfaces I need to implement for that?
Thanks for any help.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org