0 Replies Latest reply on Jan 23, 2010 11:39 PM by itays100

    Required messages are not shown

    itays100 Newbie

      Hi all,


      I'm trying to create error message template see example:


      edit.xhtml


      
      <div>
              <s:label styleClass="#{invalid?'errors':''}">
                      <ui:insert name="label"/>
                      <s:span styleClass="required" rendered="#{required}">*</s:span>
              </s:label>
              <span class="#{invalid?'errors':''}">
                      <s:validateAll>
                              <ui:insert/>
                      </s:validateAll>
              </span>
              <s:message styleClass="errors"/>  
      </div> 
            
      


      register.xhtml


      
      <a:form id="registerForm">
      <s:decorate id="passwordField" template="edit.xhtml">
               <ui:define name="label">#{messages['text.Password']}</ui:define>
                <h:inputSecret id="password" required="true" requiredMessage="#{messages['text.Password.required']}" value="#{passwordSupport.password}"/>                     
      </s:decorate>
      
      



      Tomcat error message:


      
      sourceId=registerForm:passwordField:password[severity=(ERROR 2), summary=(Please enter a password.), detail=(Please enter a password.)]
      
      



      What is the best practice to show one of 2 messages:
      requiredMessage and s:message ?