tags:

views:

189

answers:

1

If you've used JBoss SEAM you've probably used the s:decorate tag. Quite a handy tag.

Anyway I need to a way to set its invalid state through java.

I've bound the xml tags to UIDecorate instance but I'll be damned if I can figure out how to set the 'invalid' state so that the decorator will apply the appropriate error CSS classes when the page is rendered.

Is it possible to do this? Am I going about it the wrong way? Note that in this case just writing a custom validator isn't an option (usually that would be the right way of doing it obviously).

Thanks!

+1  A: 

Turns out the right way of doing this isn't by binding but simply by setting a message on the control using either StatusMessages.instance() or the injected FacesMessages.