Re: Adding a class to a div based on field validation status

2012-07-18 Thread Alex Kotchnev
Lance, thanks for the sample mixin code : I hadn't created any mixins previously and this was a great start. It works like a charm. Thiago, I did think of using the Validation decorator; however, at least for now it looked a bit of an overkill as I'm not 100% sure if this is going to be the

Re: Adding a class to a div based on field validation status

2012-07-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Jul 2012 10:32:49 -0300, Lance Java wrote: Has anyone thought of a ValidationDecorator? Nope... never heard of it... time to jump into the tapestry code / javadocs again ;) Or the mailing list archives. We've had some interesting threads involving ValidationDecorator already.

Re: Adding a class to a div based on field validation status

2012-07-18 Thread Lance Java
> Has anyone thought of a ValidationDecorator? Nope... never heard of it... time to jump into the tapestry code / javadocs again ;) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-a-class-to-a-div-based-on-field-validation-status-tp5714526p5714553.html Sent f

Re: Adding a class to a div based on field validation status

2012-07-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Jul 2012 06:38:44 -0300, Lance Java wrote: I think I would do it via a mixin on the textfield. Has anyone thought of a ValidationDecorator? -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsub

Re: Adding a class to a div based on field validation status

2012-07-18 Thread Lance Java
-- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-a-class-to-a-div-based-on-field-validation-status-tp5714526p5714547.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubs

Re: Adding a class to a div based on field validation status

2012-07-18 Thread Lance Java
ext: http://tapestry.1045711.n5.nabble.com/Adding-a-class-to-a-div-based-on-field-validation-status-tp5714526p5714546.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user

Re: Adding a class to a div based on field validation status

2012-07-17 Thread Alex Kotchnev
I ended up figuring out something that works and it turned out to be both more elegant (as it ends up being more clean and reusable than I expected) and a bit more twisted ( I totally didn't expect that I'd have to use this @HeartbeatDeferred approach, I expected something more straightforward) tha

Adding a class to a div based on field validation status

2012-07-17 Thread Alex Kotchnev
I have a very simple form and I'm trying to add a special class to a div inside the form which would indicate if the field that's contained inside the div has an error. It seems that it should be simple to do so, but I can't seem to do it. I'm trying to style the form using the Bootstrap form styl