开发者

JSF setting div class after validation exception

开发者 https://www.devze.com 2022-12-16 10:07 出处:网络
at the moment I\'ve got a construct like this: <div class=\"line\"> <label>Label</label>

at the moment I've got a construct like this:

<div class="line">
   <label>Label</label>
   <h:inputText id="text-id1" required="true" ... />
</div>

Now when a validation exception is thrown I show them in a

<h:messages ... />

Is it possible to set the error clas开发者_JS百科s to my wrapping div?


<div class="#{facesContext.maximumSeverity == null ? 'line' : 'errorLine'}">


I know this isn't exactly what you asked, but i thought i should include it for completeness.

 <h:message errorClass="errorline" infoClass="line"/>
0

精彩评论

暂无评论...
验证码 换一张
取 消