cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to create a tree smart table, but the data is not showing

0 Kudos
289

Hello,

I am trying to create a smart table with type TreeTable. I a very simple service for this, the metadata for which is as follows:

               <EntityType Name="ErrorMessage" sap:content-version="1">
			<Key>
				<PropertyRef Name="NodeID"/>
			</Key>
			<Property Name="NodeID" Type="Edm.String" Nullable="false" sap:hierarchy-node-for="NodeID"/>
			<Property Name="HierarchyLevel" Type="Edm.String" Nullable="false" sap:hierarchy-level-for="NodeID"/>
			<Property Name="ParentNodeID" Type="Edm.String" Nullable="false" sap:hierarchy-parent-node-for="NodeID"/>
			<Property Name="DrillState" Type="Edm.String" Nullable="false" sap:hierarchy-drill-state-for="NodeID"/>
		</EntityType>
		<EntityContainer Name="ZRN_ERROR_HIER_2_SRV_Entities" m:IsDefaultEntityContainer="true" sap:supported-formats="atom json xlsx">
			<EntitySet Name="ErrorMessageSet" EntityType="ZRN_ERROR_HIER_2_SRV.ErrorMessage" sap:content-version="1"/>
		</EntityContainer>

To display this tree I created the following smart table:

		<smartFilterBar:SmartFilterBar id="smartFilterBar" entitySet="ErrorMessageSet" persistencyKey="SmartFilter_Explored"
			basicSearchFieldName="Bukrs" enableBasicSearch="true">
		</smartFilterBar:SmartFilterBar>
		<smartTable:SmartTable id="smartTreeTable" smartFilterId="smartFilterBar" useExportToExcel="false" useVariantManagement="false" useTablePersonalisation="true"
			header="Hierarchy" showRowCount="false" enableAutoBinding="true" beforeRebindTable="onBeforeRebindTable" entitySet="ErrorMessageSet"
			initiallyVisibleFields="NodeID,HierarchyLevel,ParentNodeID,DrillState" tableType="TreeTable">
			<smartTable:layoutData>
				<FlexItemData growFactor="1"/>
			</smartTable:layoutData>
		</smartTable:SmartTable>

But the result is not a showing any data, even though The request is returning several entities

The type of the generated control is sap.ui.table.TreeTable.

What am I missing?

Accepted Solutions (0)

Answers (0)