1 Reply Latest reply on May 30, 2010 7:26 AM by devora

    a4j:commandLink in rich:tree with JSF2

    devora

      Hi!

       

      I have a rich:tree component on my screen, and each of his nodes has a a4j:commandLink. it look like this:

       

       

      <h:form>
           
      <rich:tree id="treeXML" switchType="client" value="#{securityManagementBean.data}"
      var="vardata">
       
      <rich:treeNode>
      <a4j:commandLink style="text-decoration: none" action="#{securityManagementBean.objectChoose}">
      <h:outputText value="#{vardata.attributes['displayName']}">
      </h:outputText>
      <f:param name="selectedObjParam"
      value="#{vardata.attributes['objectEntryId']}"></f:param>
      </a4j:commandLink>
      </rich:treeNode>
      </rich:tree>
       
      </h:form>
           
      
      
      

       

       

      it worked nicely, until we upgrated to facelet and JSF2.

      in my web.xml i added:
      <context-param>
      <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
      <param-value>com.sun.facelets.FaceletViewHandler</param-value>
      </context-param>
      <context-param>
      <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
      <param-value>true</param-value>
      </context-param>
      <context-param>
      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
      <param-value>.xhtml</param-value>
      </context-param>
      <context-param>
      <param-name>com.sun.faces.forceLoadConfiguration</param-name>
      <param-value>true</param-value>
      </context-param>
      <context-param>
      <param-name>facelets.BUILD_BEFORE_RESTORE</param-name>
      <param-value>true</param-value>
      </context-param>
      

       

      than my command buttom stopped working. it doesn't execute the action.

      Can you please tell me how did that affect the action?

        • 1. Re: a4j:commandLink in rich:tree with JSF2
          devora

          Hi!

           

          I found what was the problem.

           

          In the web.xml I defined the property facelets.BUILD_BEFORE_RESTORE as true. it should be false. I changed it and now it works fine.

          <context-param>
          <param-name>facelets.BUILD_BEFORE_RESTORE</param-name>
          <param-value>false</param-value>
          </context-param>
          
          
          

           

          thanks.