首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >可智能切换可编辑性

可智能切换可编辑性
EN

Stack Overflow用户
提问于 2019-05-15 09:00:58
回答 2查看 1.1K关注 0票数 1

我想切换一下我的控件的可编辑性。*属性的元数据为sap:updatable = true

代码语言:javascript
复制
editTogglable="true"
  • 按钮出现,但它没有影响。表字段不可编辑。

如果我一开始

代码语言:javascript
复制
editable="true"

表字段是可编辑的

代码语言:javascript
复制
<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字段(在运行时),这些代码段都不会影响可编辑字段。这些田地仍然是可供借鉴的。

代码语言:javascript
复制
this._getSmartTableId().setEditable(false);
//this._getSmartTableId().mProperties.editable = false;

问候

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2019-05-16 09:59:31

只需使用模型处理可编辑字段,就可以在前端切换。例如:

代码语言:javascript
复制
<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>
票数 1
EN

Stack Overflow用户

发布于 2019-05-15 16:12:47

editTogglable属性仅适用于SmartField控件,如文档所示:

https://sapui5.hana.ondemand.com/#/api/sap.ui.comp.smarttable.SmartTable

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56145379

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档