2 Replies Latest reply on May 12, 2008 11:28 PM by Huy Nguyen Quoc

    Rich:tree and ajaxSubmitSelection="true"

    Huy Nguyen Quoc Newbie

      I have a form looks like this

      <h:form id="lov">
       <table class="tableLayout">
       <h:messages/>
       <tr>
       <td>
       <h:outputLabel for="lovname" styleClass="label" value="#{msgs['name']}" />
       </td>
       <td>
       <h:inputText id="lovname" value="#{currentLovNode.name}" styleClass="formelement inputTextSmall formElementPaddingLeft" >
       <s:validate/>
       </h:inputText>
       </td>
       </tr>
       <tr>
       <td><h:outputLabel for="lovlabel" styleClass="label" value="#{msgs['label']}"/></td>
       <td><h:inputText id="lovlabel" value="#{currentLovNode.label}" styleClass="formelement inputTextSmall formElementPaddingLeft"/></td>
       </tr>
       <tr>
       <td><h:outputLabel for="lovvalue" styleClass="label" value="#{msgs['value']}"/></td>
       <td><h:inputText id="lovvalue" value="#{currentLovNode.value}" styleClass="formelement inputTextSmall formElementPaddingLeft"/></td>
       </tr>
       <tr>
       <td><h:outputLabel for="lovorder" styleClass="label" value="#{msgs['order']}"/></td>
       <td><h:inputText id="lovorder" value="#{currentLovNode.orderValue}" styleClass="formelement inputTextSmall formElementPaddingLeft"/></td>
       </tr>
       <tr>
       <td><h:outputLabel for="lovcomments" styleClass="label" value="#{msgs['comments']}"/></td>
       <td><h:inputText id="lovcomments" value="#{currentLovNode.comments}" styleClass="formelement inputTextSmall formElementPaddingLeft"/></td>
       </tr>
       <br/>
       </table>
       <h:commandButton id="createTopLevelLov" styleClass="button spaceright " action="#{lovManagement.newTopLevelLovNode}" value="#{msgs['new_top_level_node']}"/>
       <h:commandButton id="createLov" styleClass="button spaceright " action="#{lovManagement.newLovNode}" value="#{msgs['new_child_node']}"/>
       <h:commandButton id="updateLov" styleClass="button spaceright " action="#{lovManagement.saveLovNode}" value="#{msgs['save_node']}"/>
       <h:commandButton id="deleteLov" styleClass="button" action="#{lovManagement.deleteLovNode}" value="#{msgs['delete_node']}"/>
      
       <rich:tree switchType="client" value="#{lovManagement.rootNode}" var="node" nodeFace="lov" nodeSelectListener="#{lovManagement.processSelection}" reRender="lovname, lovlabel, lovvalue, lovorder, lovcomments" ajaxSubmitSelection="true" >
       <rich:treeNode type="lov">
       <h:outputText styleClass="label" value="#{node.name}"/>
       </rich:treeNode>
       </rich:tree>
       </h:form>
      


      I want to make the name field is required, but if I add required="true" for lovname field, i realize that fields can't be updated whenever i click the tree node. How can i bypass the validation phase whenever clicking on TreeNode ?