Skip to Content
0

SmartTable with UI-Table - Personalisation - Problems with Sort and Filter with ODATA

Jun 28, 2017 at 01:53 PM

72

avatar image

Hi all,

I'm trying to use the personalisation option of the smart table, but I've got some problems with it.

Following code in the view:

<st:SmartTable id="st_01" tableType="Table" editable="true"
		enableAutoBinding="false"
		useVariantManagement="true" persistencyKey="SmartTableAnalytical1" 		useTablePersonalisation="true" header="ProductCollection"
		showRowCount="true" useExportToExcel="false">
		
 		<t:Table id="Tabelle_1" visibleRowCount="13" class="sapUiNoContentPadding"  height="100" rows="{/Sales_ordersSet}">
			<t:Column width="120px"> 
 				<Label text="Produkt"/> 
 				<t:template> 
 					<Input value="{DNwPrid}" editable="true"/>  
 				</t:template> 
 			</t:Column>
 			<t:Column width="150px"> 
 				<Label text="Partner"/> 
 				<t:template> 
 					<Text text="{DNwBp}"/>     
 				</t:template> 
 			</t:Column>
                   </t:Table>
</st:SmartTable>

controller onInit-function:

var smarttable = view.byId("st_01");
smarttable.setEntitySet("/Sales_ordersSet"); 

When I run the app I get following error:

'initialise' no personalizable component available

The table is displayed as expected, but when I open the "Settings" I can't select the tab "sort" or "filter", I can only select the columns for display. Data are displayed correctly.

In the ODATA-Entity the checkbox for filter and sort is set (metadata.xml):

   <EntityType Name="Sales_orders" sap:content-version="1">
    <Key>
     <PropertyRef Name="DNwPrid"/>
    </Key>
    <Property Name="DNwBp" Type="Edm.String" Nullable="false" MaxLength="10" sap:label="Geschäftspartner" sap:creatable="false"/>
    <Property Name="DNwPrid" Type="Edm.String" Nullable="false" MaxLength="10" sap:label="Produkt-ID" sap:creatable="false"/>
    </EntityType>
ityContainer Name="ZSD_UI5_SRV_Entities" m:IsDefaultEntityContainer="true" sap:supported-formats="atom json xlsx">
    <EntitySet Name="Sales_ordersSet" EntityType="ZSD_UI5_SRV.Sales_orders" sap:deletable="false" sap:pageable="false" sap:requires-filter="true" sap:content-version="1"/>

Any ideas what might be the problem or any suggestions how I could fix this issue?

Many thanks and best regards

Moritz

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers