1 Reply Latest reply: May 3, 2012 7:43 AM by Manoj Sahal RSS

    Issue : unable to set action in richfaces xml tree

    Manoj Sahal Newbie

      Hi All,

       

      I am generating tree from xml file.Tree is displaying on UI

      This is my xml file

       

      <TreeMenu>

          <Menu name="USA" entitle="USA" >

              <Node name="Dashboard" action="" entitle="USA">

                  <Node name="Dashboard View" action="beanname.methodName" entitle="USA"></Node>

                  <Node name="Recruiter Report Designation" action="beanName.methodName" entitle="USA"></Node>

            </Node>

        </Menu>

      </TreeMenu>

      -----------------------------

      UI Code

       

      <rich:tree id="treeXML1" value="#{simpleTreeBean1.treeNode}" var="vardata" style="width:300px" ajaxSubmitSelection="true" switchType="client" nodeSelectListener="#{simpleTreeBean1.processSelection}"  reRender="selectedNode" treeNodeVar="xnd" adviseNodeOpened="#{simpleTreeBean1.defaultView}"> 

              

              <rich:treeNode  nodeClass="menuFontColor" highlightedClass="" selectedClass="highLightNode">

                     <f:facet name="icon">

                          <h:outputText value=""/>

                      </f:facet>

                      <f:facet name="iconLeaf">

                          <h:outputText value=""/>

                      </f:facet>

         <h:commandLink action="#{vardata.attributes['action']}" value="#{vardata.attributes['name']}"  id="mylink" styleClass="menuFontColor" target="output"/>

      </rich:treeNode>

      </rich:tree>

       

      Here is problem ?

       

      When I click on node error is shown ..

      javax.servlet.ServletException: org.apache.jasper.el.JspMethodNotFoundException: /faces/MenuTree.jsp(53,4) '#{vardata.attributes['action']}' Method not found: {entitle=USA, name=Search Views, action=utilityServiceImpl.USASearchViews}.action()

       

      But when I do <h:outputText value="#{vardata.attributes['action']}">. It is showing beanName.methodName which is correct...

       

      I dont understand this strange behavoiur..

       

      Please help me to come out from this ..

      Thanks