0 Replies Latest reply on Mar 27, 2012 2:37 AM by Bernard Labno

    Context menu and tree in RF 4

    Bernard Labno Master

      Hi, I have a tree with different types of nodes and single contextMenu. Upon clicking on particular tree node the contextMenu should appear with some items disabled.

      In sandbox version I've achieved this by wrapping menuItems with panelGroup and re-rendering that panelGroup. In contextMenu bundled with RF 4.2.0.Final I can't put anything between contextMenu and it's menuItems.

      Any idea on modifying menuItems on contextMenu show?

       

       

      {code:xml}

      <rich:tree id="tree" ... render="c cNB aSB mB">

      ...

      </rich:tree>

      <contextmenu:contextmenu id="cN" mode="ajax" attachTo="tree">

                                      <h:panelGroup id="cNB">

                                          <!--aSC=addSectionContextmenu-->

                                          <rich:menuItem id="aSC" label="addSection" onclick="aSPShow()"

                                                         mode="client" rendered="#{!bean.changeStructureMode}"

                                                         disabled="#{not bean.addingSectionAllowed}" icon="/img/questionnaireSectionCollapsed.png"/>

                                       </h:panelGroup>

      </contextmenu:contextmenu>

      {code:xml}