Hello tapestry users, at present I'm writing a custom validator for tapestry that is checking the hibernate validation annotations in my business objects. I already succeeded in getting it to work by manually setting the class and field the validator is in, e.g.:
<component id="weight" type="TextField"> <binding name="value" value="weight"/> <binding name="translator" value="translator:number,pattern=#.#"/> <binding name="validators" value="validators:hibernate=my.package.MyClass.field"/> <binding name="displayName" value="literal:Weight"/> </component> The validator is trying to validate the property via the hibernate ClassValidator. Now this could be done easier - if changing some Object on the page, the value would be bound via an OGNL expression to the text field. Then I could directly try to validate it with the corresponding validator for the target, like that: <component id="weight" type="TextField"> <binding name="value" value="ognl:myObject.myProperty"/> <binding name="translator" value="translator:number,pattern=#.#"/> <binding name="validators" value="validators:hibernate"/> <binding name="displayName" value="literal:Weight"/> </component> The hibernate validator should take its validation information (Target class and property are needed) directly from the ognl expression. Sounds complicated, please ask if it is still unclear. Any suggestions on how this could be done? Best regards Gregor --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]