2 Replies Latest reply: Mar 4, 2013 3:39 PM by 679254 RSS

    Hierarchy Viewer difference in behaviour between ADF &

      Hi All,

      We are having some problems with the Hierarchy Viewer and we were hoping that someone might be able to shed some light on this issue.

      In ADF we have used the attribute displayLevelsChildren which shows how many levels of children would be displayed (if those levels are available of course). We have assigned a value to a select one choice that would set those levels and allow for our user to customise this value and see the levels on right hand side.

      You can see the behaviour that I am referring to in the following demo:


      I know that this is an 11.1.2, but this has been the same demo for quite a while, when you change the Show Level on the left, the hierarchy viewer gets updated.

      I have created a simple app that illustrates the problem, and when I run it under it performs as expected, while when we run it on it doesn't refresh the levels

      Build JDEVADF_11.
      Build JDEVADF_11.

      The code is below

      This is the "dataBean" which is a pageFlowScope.
      package au.callista.sms.sr.view;
      import java.util.ArrayList;
      import java.util.List;
      import org.apache.myfaces.trinidad.model.ChildPropertyTreeModel;
      import org.apache.myfaces.trinidad.model.TreeModel;
      public class DataBean {
           private TreeModel dataModel;
           public DataBean() {
                DataNode grandfather = new DataNode("Big daddy");
                DataNode father1 = new DataNode("Daddy 1");
                DataNode son1 = new DataNode("Son 1");
                DataNode daughter1 = new DataNode("Daughter 1");
                DataNode father2 = new DataNode("Daddy 2");
                DataNode son2 = new DataNode("Son 2");
                DataNode daughter2 = new DataNode("Daughter 2");
                DataNode father3 = new DataNode("Daddy 3");
                DataNode son3 = new DataNode("Son 3");
                DataNode daughter3 = new DataNode("Daughter 3");
                dataModel = new ChildPropertyTreeModel(grandfather, "children");
           public void setDataModel(TreeModel dataModel) {
                this.dataModel = dataModel;
           public TreeModel getDataModel() {
                return dataModel;
           public class DataNode {
                private String title;
                private List<DataNode> children;
                public DataNode(String title) {
                     this.title = title;
                     children = new ArrayList<DataNode>();
                public void addChild(DataNode child) {
                public List<DataNode> getChildren() {
                     return children;
                public String toString() {
                     return title;
      And below is the jspx page
      <?xml version='1.0' encoding='UTF-8'?>
      <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
        <jsp:directive.page contentType="text/html;charset=UTF-8"/>
          <af:document id="d1">
            <af:form id="f1">
              <af:panelSplitter id="ps1">
                <f:facet name="first">
                  <af:panelGroupLayout id="pgl3">
                    <af:selectOneChoice label="Show Levels"
                                        value="#{pageFlowScope.levels}" id="soc1"
                      <af:selectItem label="Show No level" value="#{0}" id="si1"/>
                      <af:selectItem label="Show 1 level" value="#{1}" id="si4"/>
                      <af:selectItem label="Show 2 level" value="#{2}" id="si3"/>
                      <af:selectItem label="Show 3 level" value="#{3}" id="si2"/>
                    <af:outputText value="#{pageFlowScope.levels}" id="ot1"
                <f:facet name="second">
                  <dvt:hierarchyViewer id="hierarchyViewer1" layout="hier_vert_top"
                                       var="node" partialTriggers="::soc1"
                    <dvt:link linkType="orthogonalRounded" id="l1"/>
                    <dvt:node width="100" height="100" id="n1">
                      <f:facet name="zoom100">
                        <af:panelGroupLayout layout="vertical"
                          <af:panelGroupLayout layout="horizontal" id="pgl1">
                            <af:panelGroupLayout layout="vertical" id="pgl4">
                              <af:outputText value="#{node}"
      Looking forward to your response.

      Younis Al-Rawi

      Edited by: Younis Al-Rawi on 4/03/2013 08:58