0 Replies Latest reply on Mar 11, 2009 4:20 PM by Todd Morgan

    rich:tree treeNode action not working in a Liferay portlet

    Todd Morgan Newbie

      Originally I was using richfaces 3.3.0 with Jetspeed and developed a rich:tree with recursive tree nodes. I have a contextMenu set for these nodes with actions that would submit to navigation to the next page. Worked with no issues in Jetspeed as well as in a servlet env. I've now converted to using the Liferay 5.2.2 portal. Now I'm experiencing weird behavior where treeNodes that are not at the top level no longer result in the action making it to the backing bean. The top level nodes still work. I'm using a jboss portlet bridge and running it on a weblogic 10 server. I've duplicated several trees with all the same problem:

      <rich:tree style="width:300px" value="#{serviceTree.data}" var="item" nodeFace="#{item.type}"
      adviseNodeOpened="#{serviceTree.adviseNodeOpened}" changeExpandListener="#{serviceTree.changeExpandListener}">

      <rich:treeNode type="service" iconLeaf="/images/product_e.gif" icon="/images/product_e.gif">
      <h:outputText value="#{item.name}" id="serviceNode"/>
      <rich:contextMenu event="oncontextmenu" attachTo="serviceNode" submitMode="server">
      <rich:menuItem value="Disconnect" action="#{item.disconnect}"></rich:menuItem>
      <rich:menuItem value="Shop" action="#{item.shop}"></rich:menuItem>
      <rich:menuItem value="Suspend" action="#{item.suspend}"></rich:menuItem>
      <rich:menuItem value="Move" action="#{item.move}"></rich:menuItem>
      </rich:contextMenu>
      </rich:treeNode>

      <rich:treeNode type="address" iconLeaf="/images/house.png" icon="/images/house.png">
      <h:outputText value="#{item.name}" id="addressNode"/>
      <rich:contextMenu event="oncontextmenu" attachTo="addressNode" submitMode="server">
      <rich:menuItem value="Disconnect" action="#{item.disconnect}"></rich:menuItem>
      <rich:menuItem value="Shop" action="#{item.shop}"></rich:menuItem>
      <rich:menuItem value="Suspend" action="#{item.suspend}"></rich:menuItem>
      </rich:contextMenu>
      </rich:treeNode>

      <rich:treeNode type="serviceCategory" iconLeaf="/images/folder.png" icon="/images/folder.png">
      <h:outputText value="#{item.name}" id="serviceCategoryNode"/>
      <rich:contextMenu event="oncontextmenu" attachTo="serviceCategoryNode" submitMode="server">
      <rich:menuItem value="Disconnect" action="#{item.disconnect}"></rich:menuItem>
      <rich:menuItem value="Shop" action="#{item.shop}"></rich:menuItem>
      <rich:menuItem value="Suspend" action="#{item.suspend}"></rich:menuItem>
      <rich:menuItem value="Move" action="#{item.move}"></rich:menuItem>
      </rich:contextMenu>
      </rich:treeNode>

      </rich:tree>

      It results in a tree with

      address
      serviceCategory
      service
      service
      address
      serviceCategory
      service

      The action on address works, all other actions result in a refresh of the page, no hit to the bean (which is represented as item).

      Thanks for looking!