sapui5

openui5 js view addStyleClass

笑着哭i 提交于 2019-12-30 04:46:10
问题 How can we set class with mSetting? For example: new sap.m.Button({}).addStyleClass("my-class"); //work Another way? new sap.m.Button({ styleClass: "my-class" // did'n work }); Any possibility to set class that way? 回答1: As of now (till version SAPUI5 1.28.4), styleClass is not a supported property of sap.m.Button nor its base type's( sap.ui.core.Control ) property. Hence you have to use addStyleClass(sStyleClass) OR in XML view directly. As @Ivan said, you can use busy property because this

UsingjQuery.sap.includeScript().then() in HCP Firori Launchpad

被刻印的时光 ゝ 提交于 2019-12-29 09:49:26
问题 I'm trying to include googlemaps in sapui5 jQuery.sap.includeScript({ url: "https://maps.googleapis.com/maps/api/js?key=XXXX", promisify: true }).then(function() { ... } ) This Promise works fine when I run in hanatrial webide, But when I deploy it to hana cloud platform it is not working. The error message it gives me is : InterceptService.js:1 Uncaught (in promise) TypeError: u.indexOf is not a function(…) sap.ushell.cloudServices.interceptor.InterceptService._invokeFilters @

sap.m.Table - Vertical Scrolling with Fixed Header

假装没事ソ 提交于 2019-12-29 05:35:08
问题 I have one table having lots of data. Now I want to scroll vertically with table header fixed. can I achieve this? Here is my code: onInit: function() { var data = new JSONModel("Model/data.json"); this.getView().setModel(data); var otable = this.getView().byId("PlaceIt"); otable.bindItems("/employees", new ColumnListItem({ cells: [ new Text({ text: "{name}" }), new Text({ text: "{Physics}" }), new Text({ text: "{Chemistry}" }), new Text({ text: "{Maths}" }), new Text({ text: "{English}" }) ]

Why my filter is not working in v2.ODataModel “read”?

半世苍凉 提交于 2019-12-29 02:00:10
问题 I am using the OData model to read data. But it doesn't work. Check the code below: getGuid: function(pernr) { var self = this; var url = "/PersonalDetailSet?$filter=Pernr eq '00000001'"; self.setBusy(true); this.oModel.read(url, { success: function(res) { // ... }, error: function() { // ... } }); } I don't know why the filter in url is not working now? 回答1: myODataModel.read("/PersonalDetailSet"/*no queries here!*/, { filters:[ new Filter({ // required from "sap/ui/model/Filter" path:

Not possible to set Filter value using data binding?

纵然是瞬间 提交于 2019-12-28 01:18:12
问题 This issue came forth from drilling down the original question: How to set filter in table dropdown based on table row data Background I want to use a filter on a SAPUI5 dropdown control, where I set the filter value based on a model property (data binding) The issue If I use a filter where the filter value value1 is specified by data binding : new sap.ui.model.Filter({ path : "division", operator : sap.ui.model.FilterOperator.EQ, value1 : "{/someProperty}" }) then the dropdown does not

Not possible to set Filter value using data binding?

馋奶兔 提交于 2019-12-28 01:17:33
问题 This issue came forth from drilling down the original question: How to set filter in table dropdown based on table row data Background I want to use a filter on a SAPUI5 dropdown control, where I set the filter value based on a model property (data binding) The issue If I use a filter where the filter value value1 is specified by data binding : new sap.ui.model.Filter({ path : "division", operator : sap.ui.model.FilterOperator.EQ, value1 : "{/someProperty}" }) then the dropdown does not

Not possible to set Filter value using data binding?

。_饼干妹妹 提交于 2019-12-28 01:17:09
问题 This issue came forth from drilling down the original question: How to set filter in table dropdown based on table row data Background I want to use a filter on a SAPUI5 dropdown control, where I set the filter value based on a model property (data binding) The issue If I use a filter where the filter value value1 is specified by data binding : new sap.ui.model.Filter({ path : "division", operator : sap.ui.model.FilterOperator.EQ, value1 : "{/someProperty}" }) then the dropdown does not

OData : Why am I getting HTTP 428 (Precondition Required) error while performing an update

放肆的年华 提交于 2019-12-26 05:06:28
问题 So here's my code sap.ui.getCore().getModel("myModel").update("/ZSystemNameSet(mandt='001')", data, null, function(datay, responsey){ sap.ui.getCore().getModel().refresh(); MessageToast.show("It worked...!! Data: "+datay+"Response: "+responsey); }, function(datax,responsex){ MessageToast.show("Sorry! Data: "+datax+"Response: "+responsex); }); Also how do I add the header attributes to the update() call? 回答1: Obviously your service uses optimistic locking and expects an If-Match header,

OData : Why am I getting HTTP 428 (Precondition Required) error while performing an update

不羁岁月 提交于 2019-12-26 04:59:11
问题 So here's my code sap.ui.getCore().getModel("myModel").update("/ZSystemNameSet(mandt='001')", data, null, function(datay, responsey){ sap.ui.getCore().getModel().refresh(); MessageToast.show("It worked...!! Data: "+datay+"Response: "+responsey); }, function(datax,responsex){ MessageToast.show("Sorry! Data: "+datax+"Response: "+responsex); }); Also how do I add the header attributes to the update() call? 回答1: Obviously your service uses optimistic locking and expects an If-Match header,

Why metadataLoaded can be fired multiple times?

故事扮演 提交于 2019-12-25 20:07:42
问题 Related question: What is the replacement for metadataLoaded in JSON model? When I use metadataLoaded in sap.ui.model.odata.v2.ODataModel , Everytime _onObjectMatched is called , metadataLoaded can also be fired.: this.getRouter().getRoute("object").attachPatternMatched(this._onObjectMatched, this); _onObjectMatched : function (oEvent) { var sObjectId = oEvent.getParameter("arguments").objectId; this.getModel().metadataLoaded().then( function() { //fired every time this._bindView(sObjectId);