1 Reply Latest reply on Nov 1, 2011 7:56 PM by robertgary1

    Pass params in rich:menuItem of rich:treeNode

    robertgary1

      It appears that the types of components you can pass attributes are limited in rich:menuItem. I would like for a user to be able to rich click on a tree node and select the "delete" menu item. That requires that the delete() method on the backing bean know which node was used. I'm having trouble with that...

       

          <rich:menuItem action="#{backingBean.deleteGroup}" actionListener="#{backingBean.assignCurID}" >
              <f:setPropertyActionListener value="{currentid}" target="#{backingBean.currentGroupID}"/> <-- does not work
              <f:param name="currentid" value="{currentid}"/> <--- does not work
             
              <h:outputText value="Delete Group...{currentid}"/> <-- This evaluates correctly!!!!!
              <h:commandButton value="foobar {currentid}"/>  <--- This evaluates correctly too!!!!
             
          </rich:menuItem>

       

       

      Both the text label and the commandButton will correctly have {currentid} resolved. However, the f:setPropertyActionListener sets the value to "{currentid}".

       

      1 ) So is the ability for rich:componentControl to evaulate its parameters limited to certain components?

      2) is there any way to pass the current tree node data  to the rich:menuItem action?

       

      -Robert