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
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.
> 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 from the
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
eg:
package foo.bar.mixins;
@MixinAfter
public class ControlGroupDecorator {
@InjectContainer
private Field field;
@Environmental(false)
private ValidationTracker tracker;
private Element controlGroup;
public void afterRender(MarkupWriter writer) {
// need
I think I would do it via a mixin on the textfield.
Where the ControlGroupDecorator walks up the DOM to the first div with a
class="control-group" and adds the error class if necessary (using the t:id
of the textField to see which errors to check for).
--
View this message in context:
http://
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