On Tue, 24 May 2011 16:50:46 -0300, <jackkuros...@w9z.org> wrote:

Is there a way to tell Tapestry to use:
validate="${validationText}"
so if getValidationText returns the string "required" it will act the same way as if you wrote: validate="required"?

As already stated, you need to pass a FieldValidator instance to the validate parameter. FieldValidatorSource is the easiest way.

<... validate="prop:customValidation">

public FieldValidator getCustomValidation() {
        ...
}

Tapestry doesn't have templates with dynamic structure, so you'll be able to get the Field instance to pass to the FieldValidatorSource methods.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to