Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果您使用过 JBoss SEAM,您可能使用过 s:decorate 标签。很方便的标签。
无论如何,我需要一种通过 java 设置其无效状态的方法。
我已经将 xml 标记绑定到 UIDecorate 实例,但如果我能弄清楚如何设置“无效”状态以便装饰器在呈现页面时应用适当的错误 CSS 类,我会被诅咒的。
是否有可能做到这一点?我是不是走错了路?请注意,在这种情况下,仅编写自定义验证器不是一种选择(通常这显然是正确的做法)。
谢谢!
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.