6 Replies Latest reply on Jun 8, 2009 9:52 AM by rosmons

    rich:tree changes its selected node in case of validation er

    koloale1

      Hello!
      I have rich:tree ajaxSubmitSelection="true" and other input components with attached validators or convertors in one form:

      <h:form id="contentForm">
      <rich:tree
       nodeSelectListener="#{documentBean.processSelection}"
       adviseNodeSelected="#{documentBean.adviseNodeSelected}"
       ajaxSubmitSelection="true" switchType="ajax"
       value="#{documentBean.contentTree}" reRender="contentForm"/>
      
       <h:inputText id="age" value="#{documentBean.age}">
       <f:convertNumber/>
       </h:inputText>
       <rich:message for="age"/>
      </h:form>
      


      If I type some wrong number in the field and click other node in the tree than the validator generate message that will be shown, but the tree changes its current selected node to the new one. In the same time neither process selection listener nor adviseNodeSelected is called to somehow affect node selection in the tree.
      I would expect that when validation phase fails than the tree doesn't change its state, or corresponding listeners are notified at least.

      How do I can prevent changing a selected node in the tree in the case of validation errors?

      Thank you,
      Alexey