如果我在运行时创建一个视图及其控制器,我怎样才能将它连接到组件,而当我调用getOwnerComponent它时返回组件.
我找不到任何setOwnerComponent控制器或视图.
我有一张智能桌子。如何在智能表的一列或多列上设置初始排序顺序?
<mvc:View xmlns:m="sap.m" xmlns:mvc="sap.ui.core.mvc" xmlns:semantic="sap.m.semantic" xmlns:footerbar="sap.ushell.ui.footerbar"
xmlns:smartFilterBar="sap.ui.comp.smartfilterbar" xmlns:smartTable="sap.ui.comp.smarttable"
xmlns:app="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"
controllerName="audi.project.definition.controller.Worklist">
<semantic:SemanticPage id="page">
<semantic:content>
<smartTable:SmartTable id="smartTable" entitySet="ProjectHeaderSet" tableBindingPath="/ProjectHeaderSet"
app:p13nDialogSettings="{sort:{items:[{
columnKey: 'Description',
operation: 'Ascending'
}]}}"
header="{i18n>/X000558}" showRowCount="true" tableType="Responsive" smartFilterId="prdefWorklistFilterBarId"
showFullScreenButton="true" useVariantManagement="false" enableAutoBinding="true" ignoredFields="WbsElement,Method,Refnumber"
initiallyVisibleFields="ProjectDefinition,Description,ZProjecttypeName,ZMsSchemeText">
<smartTable:customToolbar>
<m:OverflowToolbar design="Transparent">
<m:ToolbarSpacer/>
<m:SearchField id="searchField" tooltip="{i18n>/X000559}" width="auto" search="onSearch" liveChange="onSearchLiveChange"></m:SearchField>
<m:Button type="Transparent" press="onCreateBtnPress" icon="sap-icon://add" tooltip="{i18n>/X000053}"/>
<m:Button type="Transparent" press="onDeleteBtnPress" icon="sap-icon://delete" tooltip="{i18n>/X000058}"/>
</m:OverflowToolbar>
</smartTable:customToolbar>
<m:Table id="table" mode="MultiSelect">
<m:items>
<m:ColumnListItem type="Navigation" press="onPress"/>
</m:items>
</m:Table>
</smartTable:SmartTable>
</semantic:content>
</semantic:SemanticPage>
</mvc:View>
Run Code Online (Sandbox Code Playgroud)
唯一可能成为一种解决方案的部分在这里:
app:p13nDialogSettings="{sort:{items:[{
columnKey: 'Description',
operation: 'Ascending'
}]}}"
Run Code Online (Sandbox Code Playgroud) 我有一份SAPUI5申请。
manifest.json我通过如下方式向其中添加了一个自定义 css 文件:
"resources": {
"css": [
{
"uri": "css/style.css"
}
]
},
Run Code Online (Sandbox Code Playgroud)
虽然当我将该文件部署到 ABAP 存储库时可以在 WEB IDE 中正确加载该文件,但它的地址无法正确解析。实际上,它尝试使用与 WEB IDE 中使用的相同地址加载 CSS 文件,显然会失败。
什么可能导致此问题?
我正在使用SAPUI5开发的WebIde.
如果我写了一个console.log或alert它在编辑器里面显示意外警报的错误等等.
虽然代码有效,但我更喜欢在编辑器中看不到这些错误.
如何自定义WebIde以不显示这些错误.
I have a SAPUI5 application. The translated text is shown wrongly in a dialog, while the translation is shown correct in the launchpad. Please see the following picture:
While the translation file is loaded for German language, it does not show [ÖÄÜß] correctly in the dialog. However it doesshows ö correctly in the launchpad page.
How can I solve it?
我在SAPDB中有一个整数但由于某种原因它必须存储为NUMERIC,并且数值在SAP DB中存储为字符串.
因此OData服务返回0000000001而不是1.
那么问题是如何在XML视图中删除前导零.问题是我使用XML View时无法使用Javascript进行格式化.
我找到的唯一解决方案是使用这样的代码:
<Text text="{path:'ZId', type:'sap.ui.model.odata.type.ODataType', oConstraints:{isDigitSequence: true}}" />
Run Code Online (Sandbox Code Playgroud)
但我不知道为什么它没有删除前导零,而在其参考文献中已经说过:
if true, the value is handled as a sequence of digits; while formatting leading zeros are removed from the value and while parsing the value is enhanced with leading zeros (if a maxLength constraint is given) or leading zeros are removed from the value (if no maxLength constraint is given); this constraint is supported since 1.35.0. To make this type behave as ABAP …