Re: context-dependent validator

2013-10-04 Thread Ilya Obshadko
That makes sense, thank you! On Sat, Oct 5, 2013 at 12:53 AM, Barry Books wrote: > It has this method > > *public* *void* render(Field field, String message, MarkupWriter writer, > FormSupport formSupport) { > > > } > > > which gives you the field, the form and a writer to the element. I use i

Re: context-dependent validator

2013-10-04 Thread Barry Books
It has this method *public* *void* render(Field field, String message, MarkupWriter writer, FormSupport formSupport) { } which gives you the field, the form and a writer to the element. I use it to write data- attributes into the html markup and then the javascript can access them. I think yo

Re: context-dependent validator

2013-10-04 Thread Ilya Obshadko
On Fri, Oct 4, 2013 at 9:25 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Fri, 04 Oct 2013 03:51:59 -0300, Ilya Obshadko > wrote: > > Hello, >> > > Hi! > > > I have checked http://wiki.apache.org/**tapestry/** >> Tapestry5HowToAddValidators

Re: context-dependent validator

2013-10-04 Thread Ilya Obshadko
On Fri, Oct 4, 2013 at 8:17 PM, Barry Books wrote: > You might be able to do this with a translator instead of a validator. They > are really for converting data but you can also throw validation > exceptions, access the current field and add data to the html element. > Does translator really ha

Re: context-dependent validator

2013-10-04 Thread Thiago H de Paula Figueiredo
On Fri, 04 Oct 2013 03:51:59 -0300, Ilya Obshadko wrote: Hello, Hi! I have checked http://wiki.apache.org/tapestry/Tapestry5HowToAddValidators, it's pretty clear how to do that, but I don't have any idea how do I inject actual component data into validator when needed. Which data? Fr

Re: context-dependent validator

2013-10-04 Thread Barry Books
You might be able to do this with a translator instead of a validator. They are really for converting data but you can also throw validation exceptions, access the current field and add data to the html element. On Fri, Oct 4, 2013 at 1:51 AM, Ilya Obshadko wrote: > Hello, > > Is that possible t