0 Replies Latest reply on Aug 24, 2011 10:53 AM by Michael De Gols

    JSF 2.0 + component styling on validation error

    Michael De Gols Newbie

      Hi all,


      I'm trying to make that code working but without success. I'm using mojarra 2.0.6.

      <h:panelGroup styleClass="#{!foo.valid ? 'error' : 'none'}">
      <h:inputText id="foo" binding="#{foo}" />
      <h:message for="foo" />


      The selected style class is always error.


      This code is working:

      <h:inputText id="foo" value="#{newMember.email}" styleClass="#{!component.valid ? 'invalid' : 'none'}"/>


      Any hints ? Any other solution ? Thanks!