切换 smarttable 的可编辑性
toggle editability of smarttable
我想在智能表中切换我的控件的可编辑性。
* 属性的元数据是 sap:updatable = true
editTogglable="true"
- 按钮出现,但没有任何影响。 Table 字段不可编辑。
如果我最初设置
editable="true"
Table 字段是可编辑的
<smartTable:SmartTable id="ReportSmartTable" entitySet="StudentHeaderSet" tableBindingPath="/StudentHeaderSet" tableType="Table"
header="Artikel" showRowCount="true" enableAutoBinding="true" class="sapUiResponsiveContentPadding" showFullScreenButton="true"
smartFilterId="smartFilterBar" useVariantManagement="false" persistencyKey="SmartTableUEreport" useTablePersonalisation="true"
editTogglable="true" editable="true" beforeRebindTable="onBeforeRebindTable">
如果我想将字段可编辑设置为 false(在运行时)none 这些片段会影响可编辑字段。这些字段仍然可以编辑。
this._getSmartTableId().setEditable(false);
//this._getSmartTableId().mProperties.editable = false;
问候
如文档所述,editTogglable
属性仅适用于 SmartField 控件:
https://sapui5.hana.ondemand.com/#/api/sap.ui.comp.smarttable.SmartTable
只需使用模型处理可编辑字段,您可以在 front-end 中进行切换。例如:
<ui:columns>
<ui:Column visible="true" hAlign="Left" sortProperty="PropertyName" filterProperty="PropertyName" customData:p13nData='\{"columnKey": "PropertyName", "leadingProperty":"PropertyName", "type":"string"}'>
<Label text="Title"/>
<ui:template>
<Input editable="{worklistView>/editable}" value="{ path: 'PropertyName' }" />
</ui:template>
</ui:Column>
</ui:columns>
我想在智能表中切换我的控件的可编辑性。 * 属性的元数据是 sap:updatable = true
editTogglable="true"
- 按钮出现,但没有任何影响。 Table 字段不可编辑。
如果我最初设置
editable="true"
Table 字段是可编辑的
<smartTable:SmartTable id="ReportSmartTable" entitySet="StudentHeaderSet" tableBindingPath="/StudentHeaderSet" tableType="Table"
header="Artikel" showRowCount="true" enableAutoBinding="true" class="sapUiResponsiveContentPadding" showFullScreenButton="true"
smartFilterId="smartFilterBar" useVariantManagement="false" persistencyKey="SmartTableUEreport" useTablePersonalisation="true"
editTogglable="true" editable="true" beforeRebindTable="onBeforeRebindTable">
如果我想将字段可编辑设置为 false(在运行时)none 这些片段会影响可编辑字段。这些字段仍然可以编辑。
this._getSmartTableId().setEditable(false);
//this._getSmartTableId().mProperties.editable = false;
问候
如文档所述,editTogglable
属性仅适用于 SmartField 控件:
https://sapui5.hana.ondemand.com/#/api/sap.ui.comp.smarttable.SmartTable
只需使用模型处理可编辑字段,您可以在 front-end 中进行切换。例如:
<ui:columns>
<ui:Column visible="true" hAlign="Left" sortProperty="PropertyName" filterProperty="PropertyName" customData:p13nData='\{"columnKey": "PropertyName", "leadingProperty":"PropertyName", "type":"string"}'>
<Label text="Title"/>
<ui:template>
<Input editable="{worklistView>/editable}" value="{ path: 'PropertyName' }" />
</ui:template>
</ui:Column>
</ui:columns>