I want to use smart table with a named model. If we use a named model then it does not show the data. One possibility is to use custom list and custom columns. But as soon as I use the custom List it shows data but it will remove the defined custom columns from the "Filter, Group and sort" tabs. It means in the P13N dialog you can just play with the position of columns (As soon as you define the custom columns for all fields it will remove the "Filter, Group and sort" tabs from the P13N dialog).
I need to use named model because of some reasons. Then I need to use custom list items and columns. Now the question is how I can keep these fields or columns in the filtering, sorting and grouping tabs in P13N dialog.
<smartTable:SmartTable id="__smartTableMlst" entitySet="ProjectHeaderMstSet" tableBindingPath="TableMlstJsonModel>/ProjectHeaderMstSet"
header="{i18n>tableMlstTitle}" showRowCount="true" tableType="Responsive" showFullScreenButton="false" useVariantManagement="false"
enableAutoBinding="true" ignoredFields="ProjectDefinition,Method,Refnumber" useExportToExcel="false"
initiallyVisibleFields="MilestoneNumber,Description,OffsetMilestoneDate,OffsetMilestoneDateUnit">
<smartTable:customToolbar>
<m:OverflowToolbar design="Transparent">
<m:ToolbarSpacer/>
<m:Button type="Transparent" press="onRefreshMlstBtnPress" icon="sap-icon://refresh" tooltip="{i18n>refreshBtnTooltip}"/>
<m:Button type="Transparent" press="onAddMlstBtnPress" icon="sap-icon://add" tooltip="{i18n>createBtnTooltip}"
enabled="{objectView>/tableMlstBtnAddEnabledFinal}"/>
<m:Button type="Transparent" press="onDeleteMlstBtnPress" icon="sap-icon://delete" tooltip="{i18n>deleteBtnTooltip}"
enabled="{objectView>/tableMlstBtnDelEnabledFinal}"/>
</m:OverflowToolbar>
</smartTable:customToolbar>
<m:Table id="tableMlst" mode="MultiSelect" busy="{objectView>/tableMlstBusy}">
<m:columns>
<m:Column>
<m:customData>
<core:CustomData key="p13nData" value='\{"columnKey": "MilestoneNumber", "leadingProperty": "MilestoneNumber"}'/>
</m:customData>
<m:Text text="{/#ProjectHeaderMst/MilestoneNumber/@sap:label}"/>
</m:Column>
</m:columns>
<m:items>
<m:ColumnListItem type="Navigation" press="onPress">
<m:cells>
<m:Text text="{path: 'TableMlstJsonModel>MilestoneNumber', formatter: '.formatter.intNumber'}"/>
<m:Text text="{TableMlstJsonModel>Description}"/>
<m:Text text="{TableMlstJsonModel>OffsetMilestoneDate}"/>
<m:Text text="{TableMlstJsonModel>OffsetMilestoneDateUnit}"/>
<m:Text text="{TableMlstJsonModel>Activity}"/>
<m:Text text="{TableMlstJsonModel>ActivityName}"/>
<m:Text text="{TableMlstJsonModel>Aedat}"/>
<m:Text text="{TableMlstJsonModel>Aenam}"/>
<m:Text text="{TableMlstJsonModel>Erdat}"/>
<m:Text text="{TableMlstJsonModel>Ernam}"/>
<m:Text text="{TableMlstJsonModel>MlstSmlnr}"/>
<m:Text text="{TableMlstJsonModel>Network}"/>
<m:Text text="{TableMlstJsonModel>NetworkName}"/>
</m:cells>
</m:ColumnListItem>
</m:items>
</m:Table>
</smartTable:SmartTable>
I know about the usage of annotation files in smart tables, but is it possible to use annotation files with named JSON models? In the following image You can see how the MilestoneNumber has been removed from the filter list.