3 Replies Latest reply on Jun 26, 2007 5:45 AM by Pete Muir

    Registration example again: method binding without component

    Daniel Kane Novice

      Hello
      Please help me to understand the following code in Registration example :

      register.xhtml uses RegisterAction component annotated as "register", e.g. :

      <s:decorate id="verifyDecorate" template="edit.xhtml">
      <ui:define name="label">Verify Password:</ui:define>
      <h:inputSecret id="verify" value="#{register.verify}" required="true"/>
      </s:decorate>
      


      RegisterAction.java also has method invalid() :
      public void invalid()
       {
       facesMessages.add("Please try again");
       }
      



      And, edit.xhtml contains code :

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



      I don't understand which components "#{invalid}" and "#{required}" refers to in edit.html. Or these are some global variables outside of components, how do I know more about them then ?

      Thank you.