将自定义列添加到SAPUI5智能-columnKey错误
我有一个XML视图,其中有一个绑定到oData服务的智能表。对于这个智能表,我想为将自定义列添加到SAPUI5智能-columnKey错误,sapui5,Sapui5,我有一个XML视图,其中有一个绑定到oData服务的智能表。对于这个智能表,我想为erdat添加一个自定义列,如中所述 XML视图中的代码: <smartTable:SmartTable id="smartTable0" entitySet="<my_entity_set>" enableAutoBinding="true" beforeRebindTable="onBeforeRebindTable" tableType="ResponsiveTable" useEx
erdat
添加一个自定义列,如中所述
XML视图中的代码:
<smartTable:SmartTable id="smartTable0" entitySet="<my_entity_set>" enableAutoBinding="true" beforeRebindTable="onBeforeRebindTable"
tableType="ResponsiveTable" useExportToExcel="true" useTablePersonalisation="true" showRowCount="true" showFullScreenButton="true"
class="sapUiResponsiveContentPadding" exportType="UI5Client" demandPopin="true">
<smartTable:layoutData>
<FlexItemData growFactor="1" baseSize="0%"/>
</smartTable:layoutData>
<Table alternateRowColors="true" fixedLayout="false" growing="true" growingScrollToLoad="true" growingThreshold="20">
<columns>
<Column width="200px" hAlign="Begin">
<customData>
<core:CustomData key="p13nData" value="\{'columnKey': 'erdat', 'leadingProperty': 'erdat', 'columnIndex': '0'}"/>
</customData>
<Text text="Erdat"/>
</Column>
</columns>
<items>
<ColumnListItem>
<cells>
<Text text="{path: 'erdat'}"/>
</cells>
</ColumnListItem>
</items>
</Table>
</smartTable:SmartTable>
如果没有自定义列,智能表将按预期显示数据。添加自定义列时,出现错误:
Uncaught(在promise中)表实例包含一些提供了columnKey的列,而有些列没有提供columnKey
该表仅显示列标题,不显示数据。我尝试了几种组合,包括columnKey
或leadingProperty
和columnKey,但都没有成功。oData服务中包括字段erdat
网络搜索并没有为我提供解决方案。任何帮助都将不胜感激。如果我在
中用“
替换”
,反之亦然,
将按预期工作。应该键入与示例中完全相同的内容