sapui5

Synchronize Input with Slider values independent from locales

馋奶兔 提交于 2021-01-28 11:34:14
问题 This is a follow-up question to How to bind integer Input value to Slider. I have found out that the demo solution in this answer only works when there are integer values in the slider and the language of your browser is set to English. Snippet from the demo: <Input xmlns="sap.m" xmlns:core="sap.ui.core" core:require="{FloatType: 'sap/ui/model/type/Float'}" type="Number" value="{ path: '/value', type: 'FloatType' }" /> To reproduce the issue: Go to the settings of your browser. Set e.g.

SmartTable control has internal load resource error since 1.74

蹲街弑〆低调 提交于 2021-01-28 11:21:04
问题 I am using the 'SmartTable' control in some SAP cloud foundry UI5 apps. Since a week or so the table control cannot render anymore using the current release (1.74.1) as the following XHR load fails: https://sapui5.hana.ondemand.com/resources/sap/ui/table/TableExtension.js If I force the usage of an older release - eg '1.73.1' - then it works fine and the above resource is found. Is there something changed with the 'Smart Table' concept I am not aware of or is this an issue with the library

Disable item inside combo box SAPUI5

ⅰ亾dé卋堺 提交于 2021-01-28 09:32:08
问题 I have a combo box with, let's say, 2 items. one of the items has relevant data to report, and the other doesn't. How would I grey out the unwanted item in the combo box? I can grey out the entire combo box, but I'm not sure how to grey out items inside a combo box (this combo box is populated by an ODATA call). 回答1: You can set the items of the combo box to the disabled as follows: Want to disable the selected item from combo box list: this.getView().byId("idOfYourComboBox").getSelectedItem(

Disable item inside combo box SAPUI5

独自空忆成欢 提交于 2021-01-28 09:25:03
问题 I have a combo box with, let's say, 2 items. one of the items has relevant data to report, and the other doesn't. How would I grey out the unwanted item in the combo box? I can grey out the entire combo box, but I'm not sure how to grey out items inside a combo box (this combo box is populated by an ODATA call). 回答1: You can set the items of the combo box to the disabled as follows: Want to disable the selected item from combo box list: this.getView().byId("idOfYourComboBox").getSelectedItem(

Extend control with HBox container and inherited but customized event

跟風遠走 提交于 2021-01-28 00:13:48
问题 The idea is to have a HBox container under the MultiComboBox control to which selected tokens will be pushed. I have followed different tutorials and couldn't get a success. A multiComboBox is simply now shown. The idea: Simplified (testing) implementation of custom control: sap.ui.define([ 'sap/m/MultiComboBox', 'sap/m/HBox' ], function (MultiComboBox, HBox) { 'use strict'; /** * Constructor for a new MultiCombobox with tokens. */ return MultiComboBox.extend('drex.control.DropDownWithTags',

Where does the “exit” method come from? Where is it documented?

三世轮回 提交于 2021-01-27 21:01:10
问题 I've been following the walkthrough tutorial on Step 19: Reuse Dialogs. In the code below, I cannot figure out where the exit method comes from. I could not find anything in the API reference for ManagedObject. sap.ui.define([ "sap/ui/base/ManagedObject", "sap/ui/core/Fragment" ], function (ManagedObject, Fragment) { "use strict"; return ManagedObject.extend("sap.ui.demo.walkthrough.controller.HelloDialog", { constructor: function(oView) { this._oView = oView; }, exit: function () { delete

Data attribute in XML View elements

此生再无相见时 提交于 2021-01-27 19:22:31
问题 I'm trying to add data attributes to elements in a XML View as below: <core:FragmentDefinition xmlns="sap.m" <VBox data-help-id="Some.String.Here"> ... </VBox> </core:FragmentDefinition> but couldn't find how to do it, unless I assign them via Controller. Tried using CustomData namespace, but it only adds data, without adding the HTML attribute to the DOM element. Any idea? Thanks! 回答1: You can only influence the attributes written to the DOM using the standard control properties. If the

Data attribute in XML View elements

穿精又带淫゛_ 提交于 2021-01-27 18:39:25
问题 I'm trying to add data attributes to elements in a XML View as below: <core:FragmentDefinition xmlns="sap.m" <VBox data-help-id="Some.String.Here"> ... </VBox> </core:FragmentDefinition> but couldn't find how to do it, unless I assign them via Controller. Tried using CustomData namespace, but it only adds data, without adding the HTML attribute to the DOM element. Any idea? Thanks! 回答1: You can only influence the attributes written to the DOM using the standard control properties. If the

Filters in SAPUI5 viz

怎甘沉沦 提交于 2021-01-24 15:45:14
问题 I am trying to display a result det data on a table and a chart together. For exampIe: A user gives a value as an input and a query has to be made to the server to filter the table based on the user input and give nbacj the result set. I am implementing a filter on the table and then bind the filtered result set to the table. I write the below code which works fine. var oModel = new sap.ui.model.odata.ODataModel( "../TEST_ODATA.xsodata",false); oTable.setModel(oModel); var oFilter=new sap.ui

Export business data from UI5 to Excel

Deadly 提交于 2021-01-19 08:36:53
问题 I have a table with product details like ID , description , price etc.. I am trying to export these data to an Excel. Issue If I just do getModel("A") , and then bind few properties of "A", which are not nested, the excel is downloaded fine. But if there is any other structure, which I am trying to access for example, getModel("A").getProperty("/Person/PersonFullName") , it will leave that column blank . { // Controller onExport: function() { var aCols, aProducts, oSettings; aCols = this