on 2021 Dec 29 5:41 AM
Hi All,
I have a requirement, wherein I am displaying a sap.m.table under an Icon Tab Bar. Now, I need to show the count of the total number of records in table. I am using the following code:-
Even though, there are records in the table, it is still not displaying the count on the IconTabBar Filter. Please suggest.
RegardsMeenakshiRequest clarification before answering.
Hi Meenakshi,
My suggestion to you would be to check if you binding paths are right, for example if your JSONModel is of the below structure
"AvailParts":{
"AvailCount": "10",
"results":[/*array of Row items*/]
}
where "AvailCount" holds the value of the number of rows in your table under the named model "AvailParts" then try the below binding
<IconTabFilter key="1" id="id_Availparts_KP" count="{AvailParts>AvailCount}">
<Table id="id_AvailParts" items="{AvailParts>/results}">
<columns>
<Column width="12em">
<Text text="Product" />
</Column>
/* number of columns as per your requirement*/
</columns>
<items>
<ColumnListItem vAlign="Middle">
<cells>
/*considering Name and ProductId are attributes in your results list*/
<ObjectIdentifier title="{AvailParts>Name}"
text="{AvailParts>ProductId}"/>
</cells>
</ColumnListItem>
</items>
</Table>
Or you can also bind this results' array length to the icon tab filter through your controller coding. For that use setCount Method of IconTabFilter.
Hope this information helps you.. 🙂
Happy learning!!
Regards
Imtiaz N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
40 | |
15 | |
10 | |
9 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.