sapui5

ODataModel aggregation's getBindingContext() returns undefined [duplicate]

强颜欢笑 提交于 2021-02-11 12:37:52
问题 This question already has answers here : getBindingContext() Returns undefined (2 answers) Closed 2 years ago . I have a sap.m.VBox control, of which the items aggregation is bound to an ODataModel dataset, and as such is being populated by a sap.m.HBox template control containing multiple sap.m.Input controls (which are bound to the respective ODataModel's dataset properties) In code: <VBox items="{/My_ODatamodel_Dataset}"> <items> <HBox> <Input value="{property1} change="doSomething"/>

How to reset controls to their initial values in SAPUI5?

痞子三分冷 提交于 2021-02-11 07:56:32
问题 I have a form with a lot of controls ( ComboBoxes , TextAreas , RadioButtons ) using OpenUI5. I give the values of the controls on the server side in C++. What I want is to have a reset button, which will clear the choices of the user and revert the controls back with the default choices. Until now, I am able to have the form and the controls as an JS object like this: this.byId("MainForm").getModel(); The only think I am able to do until now is to totally clear all the controls like this:

Filter UI5 aggregation binding in XML view

妖精的绣舞 提交于 2021-02-11 06:35:41
问题 I click a button and navigate to a view where I have a table and am trying to filter. If I enter this : filters: {path: 'ReturnItemFlag' operator: 'EQ' value1: 'Y'} the view fails to load. If I remove that line, it loads. What can be possibly wrong in this syntax: I am trying to filter the rows in table based on whether the item has "ReturnFlag" = "Y" . If it has then I want to display the row. <table:Table id="T1" class="table" rows="{ path: 'takeStockOrderDetail>/ItemSet/results', filters:

SAP UI5 XML View Data Binding syntax

北战南征 提交于 2021-02-11 05:52:32
问题 I try to figure out how I can bind data to sap.m.CustomListItem during onInit of my controller. I tried a lot but nothing seems to fit. It looks so easy on the examples from the UI5 Demo Kit. <mvc:View height="100%" controllerName="sap.ui.demo.toolpageapp.controller.settings.MasterSettings" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"> <List> <items items="{folder>objects}"> <CustomListItem items="{folder>/object/properties/cmis:name/value}"> <Link id="text6" maxLines="0" text="{folder>/object

How to hide “Select All”-CheckBox from Table?

泄露秘密 提交于 2021-02-10 16:20:33
问题 I want to remove the check box which enables selecting all items from the table ( sap.m.Table ). I tried: var oTable = this.byId('MyTableId'); oTable._getSelectAllCheckbox().setVisible(false); It didn't work for me. Is there a way to set it false in XML ? I know I can use CSS but I want to use CSS only if there is no other solution. 回答1: sap.m.Table (aka. Responsive Table ) Currently, there is no publicly documented API to enable/disable showing the "Select All"-CheckBox on sap.m.Table . Best

How to hide “Select All”-CheckBox from Table?

◇◆丶佛笑我妖孽 提交于 2021-02-10 16:19:43
问题 I want to remove the check box which enables selecting all items from the table ( sap.m.Table ). I tried: var oTable = this.byId('MyTableId'); oTable._getSelectAllCheckbox().setVisible(false); It didn't work for me. Is there a way to set it false in XML ? I know I can use CSS but I want to use CSS only if there is no other solution. 回答1: sap.m.Table (aka. Responsive Table ) Currently, there is no publicly documented API to enable/disable showing the "Select All"-CheckBox on sap.m.Table . Best

Navigating to a different (JS)View - Unable to access Router

孤者浪人 提交于 2021-02-10 07:46:38
问题 I have a homepage with two tiles which is working as expected. On clicking tile one, my control should navigate to "SearchProductPage". I have the following files: homepage.view.js homepage.controller.js SearchProductPage.view.js SearchProductPage.controller.js So when I click on the tile, I get the alert messages per code. But my code is not navigating to the SearchProductPage.view.js . And when trying to access the router, it returns undefined . Views homepage.view.js sap.ui.jsview("view

Typescript: Declare functions without implementing them

随声附和 提交于 2021-02-10 03:09:42
问题 Is it possible to declare that a class has certain functions without implementing them? I need this because I create a class that is then passed to a js framework which adds a couple of functions. I wanna be able to call those functions aswell without reimplementing them, redirecting or casting or whatsoever. Example: //example class class AppComponent { constructor() {} } //create class var comp: AppComponent = new AppComponent(); //hand over to framework fw.define("Component", comp); //now

Typescript: Declare functions without implementing them

走远了吗. 提交于 2021-02-10 03:03:08
问题 Is it possible to declare that a class has certain functions without implementing them? I need this because I create a class that is then passed to a js framework which adds a couple of functions. I wanna be able to call those functions aswell without reimplementing them, redirecting or casting or whatsoever. Example: //example class class AppComponent { constructor() {} } //create class var comp: AppComponent = new AppComponent(); //hand over to framework fw.define("Component", comp); //now

Typescript: Declare functions without implementing them

蹲街弑〆低调 提交于 2021-02-10 03:01:20
问题 Is it possible to declare that a class has certain functions without implementing them? I need this because I create a class that is then passed to a js framework which adds a couple of functions. I wanna be able to call those functions aswell without reimplementing them, redirecting or casting or whatsoever. Example: //example class class AppComponent { constructor() {} } //create class var comp: AppComponent = new AppComponent(); //hand over to framework fw.define("Component", comp); //now