Skip to Content
0
Sep 19, 2016 at 04:01 PM

Problem with JSP treeDataTable - destroy by collapsing

23 Views

Hi All,

I have try to use the sap:treeDataTable in jsp for a popup in the pod. All locks fine. But if I collapse a node, the popup and the pod will close.

My code in JSP:

<sap:treeDataTable id="allElementsResultListTable" width="100%"

binding="#{treeDataTableDemoTreeTableConfigurator.table}"

value="#{treeDataTableUiPlugin.treeModel}" first="0" varTreeNode="row2"

rows="5" var="row"

expansionChangeListener="#{treeDataTableUiPlugin.expansionChangeListener }">

</sap:treeDataTable>

and in Java:

public TreeModel getTreeModel() {

if (treeModel == null) {

DefaultTreeNode treeNode = new DefaultTreeNode("PropertyDto", new PropertyDto("Root", "Value of Root"), null);

treeNode.addChild(new DefaultTreeNode("PropertyDto", new PropertyDto("Node 1", "Value of Node 1"), null));

treeNodeOfTreeModel = new DefaultTreeNode("PropertyDto", new PropertyDto("Node 2", "Value of Node 2"), treeNode);

treeModel = new TreeModel(treeNode);

}

return treeModel;

}

The table configurator is:

<managed-bean>

<managed-bean-name>allElementsTreeTableConfigurator</managed-bean-name>

<managed-bean-class>com.sap.me.production.podclient.PodClientTableConfigurator</managed-bean-class>

<managed-bean-scope>session</managed-bean-scope>

<managed-property>

<property-name>beanName</property-name>

<value>allElementsTreeTableConfigurator</value>

</managed-property>

<managed-property>

<property-name>activatePaging</property-name>

<value>true</value>

</managed-property>

<managed-property>

<property-name>allowSelections</property-name>

<value>false</value>

</managed-property>

<managed-property>

<property-name>multiSelectType</property-name>

<value>false</value>

</managed-property>

<managed-property>

<property-name>columnBindings</property-name>

<property-class>java.util.HashMap</property-class>

<map-entries>

<key-class>java.lang.String</key-class>

<value-class>java.lang.String</value-class>

<map-entry>

<key>PROP_NAME</key>

<value>propName;SBXWK4_WEATHER.output.propName.label</value>

</map-entry>

<map-entry>

<key>PROP_VALUE</key>

<value>propValue;SBXWK4_WEATHER.output.propValue.label</value>

</map-entry>

</map-entries>

</managed-property>

</managed-bean>

How can I fix this issue? Or has anyone an example for me?