4 Replies Latest reply on Feb 24, 2015 7:03 PM by santhosh siravuri

    jsf 2.2 and rf 4.5.1 upgrade breaks my rich:tree

    santhosh siravuri Newbie

      I recently upgraded from JSF 2.1.28 + RF 4.3.7 to JSF 2.2.9 + RF 4.5.1 and below code which was working fine started failing.

      <rich:tree var="item" id="attributesTree" toggleNodeEvent="click" toggleType="client">

           <rich:treeModelAdaptor nodes="#{attributeTreeBean.categoryGroup}">

                <rich:treeNode expanded="#{attributeTreeBean.rowsAndColumnsTreeChildrenExpanded}"

                               rendered="#{item.categoryGroupName eq 'rowsandcolumns'}">

                     <h:outputText value="#{item.categoryGroupName}" class="inforTree rf-trn-lbl" />

                </rich:treeNode> 

                <rich:treeModelAdaptor id="categoriesAdaptor" nodes="#{item.categories}"

                     rendered="#{item.categoryGroupName eq 'rowsandcolumns'}">

                <rich:treeNode iconClass="no-icon" expanded="#{attributeTreeBean.rowsAndColumnsTreeLeavesExpanded}">

                     #{item.categoryName}

                </rich:treeNode>

          

      In the first level rich:treeModelAdaptor nodes=#{attributeTreeBean.categoryGroup} returns a List and each CategoryGroup is assigned to item variable in rich:tree var

      inside first rich:treeNode item.categoryGroupName refers to CategoryGroup.categoryGroupName and works fine.

      When it reaches nested rich:treeModelAdaptor nodes=#{item.categories} it returns List and each Category is assigned to item. This is where in the same rich:treeModelAdaptor definition the part rendered="#{item.categoryGroupName eq 'rowsandcolumns'}" looks for Category.categoryGroupName instead of CategoryGroup.categoryGroupName and fails with PropertyNotFoundException.

      The same code works fine before Richfaces upgrade. Is there any major change in RF 4.5.1 that can cause this?

      Thank you