1 Reply Latest reply on Jan 18, 2008 5:37 PM by mmichalek

    required automatic mark

    jmiguel77

      Hi

      this may seem a fool question

      is there any way to add an automatic mark for required fields ??

      or i will have to do this by hand ?? or css maybe ???

      thanks a lot

        • 1. Re: required automatic mark
          mmichalek

          If you are using Facelets you might be able to template in a CSS or content change based on the required attribute.

          For example (this would be the body of a facelts composition/component):

          ...
           <c:set var="styleClass" value="inputTextDefault"/>
           <c:if test="#{required}">
           <c:set var="styleClass" value="#{styleClass} inputTextRequired" />
           </c:if>
           <h:inputText
           value="#{value}" styleClass="#{styleClass}">
           <ui:insert />
           </h:inputText>
          ...