SAP UI5 Articles

Page 2 of 2

Binding model to sap.ui.core in SAP UI5 application

Johar Ali
Johar Ali
Updated on 14-Feb-2020 325 Views

Please try below where you need to prefix propertyBinding with models name −var oItemTemplate = new sap.m.ActionListItem({    title : "{checks>title}",    ... });

Read More

In SAP UI5 render calling two times in custom control

Rahul Sharma
Rahul Sharma
Updated on 14-Feb-2020 457 Views

In your custom control, there are two aggregation updates- setAggregation and addContent. When you use Aggregation mutators, it uses 3rd parameter to suppress invalidation.It will insert the aggregation but suppress the invalidation since whole control will be rendered at the end it.oControl.setAggregation("layout", oSavedButtonHLyt, true); // suppress invalidateYou should think that It should work same for “addContent”.oSavedButtonHLyt.addAggregation("content", manageSavedSearch[index], true);However, it doesn’t work as UI5 cannot determine automatically for the previous parent's suppress cos its aggregation will be moved. You have to note that property, aggregation or an association invalidates control when control does not overwrite its mutator method.

Read More

Converting OData using SAPUI5 libraries to JSON format

Ali
Ali
Updated on 14-Feb-2020 627 Views

This can be done in multiple ways. One of common approach would be by passing user name/password in URL.$.ajax({ url : "http://user:password@url/SERVICE?$format=json", type: "GET", //or POST? dataType: "jsonp", success: function(){alert("ok")}, error: function(){alert("error")} })

Read More

Binding OData service to SAP UI5 table

Sravani S
Sravani S
Updated on 14-Feb-2020 1K+ Views

Your service end point is incorrect- var oModel = new sap.ui.model.odata.v2.ODataModel("http://admin- think:88/sap/...",{useBatch : true});.To fix this issue, you need to remove “CoreOpenAppSet()” portion of the variable which is getting passed to ODataModel constructor. You need to pass function import using ODataModel- “oModel.callFunction()”.Once function call is completed, you can bind the result using “setBindingContext” as in below code −var oPromise = oModel.callFunction("/CoreOpenAppSet"); oPromise.contextCreated().then(function(oContext) {    oView.setBindingContext(oContext); });

Read More

Using SSO logon tickets in SAPUI5

karthikeya Boyini
karthikeya Boyini
Updated on 16-Dec-2019 428 Views

When your proxy has SSO token, you should use SET-COOKIE header to pass SSO token to the client.Exampleset-cookie: MYSAPSSO2=DFOKJLDM.....AJLBhHcvA%3d%3e; path=/; domain=xxxxx.sap.comIt should be passed to client browser from proxy and domain name has to be changed to the proxy as shown below:set-cookie: MYSAPSSO2=DFOKJLDM.....AJLBhHcvA%3d%3e; path=/; domain=PROXYDOMAIN.comWhen next time your browser calls to the proxy, this will include session cookie in the request header like below. The proxy will read that Cookie from HTTP request header to make calls.Cookie: MYSAPSSO2=DFOKJLDM.....AJLBhHcvA%3d%3e;

Read More

Using ControlAggregation in SAPUI5

Govinda Sai
Govinda Sai
Updated on 16-Dec-2019 875 Views

“ControlAggregation” refers to the target aggregation to which the mapped view is added.As Specified in the use case below:"routing": {    "config": {       "routerClass": "sap.m.routing.Router",       "viewType": "XML",       "viewPath": "sap.ui.demo.nav.view",       "controlId": "app",       "controlAggregation": "dummy",       "transition": "slide",       "bypassed": {          "target": "NA"       }ExampleThe views are defined as follows:     So here “controlAggregation” is named as 'dummy' but the app is named as SampleApp.so the target is 'sap.m.SampleApp' and aggregation is named as 'dummy'. Let ...

Read More

Reading an image using SAP OData v2 in UI5 application

Sravani S
Sravani S
Updated on 30-Jul-2019 629 Views

You have to use below code:img.setSrc("/path/to/my/service/UserPhotoSet('someone@gmail.com')/$value");Here you need to replace part with original path.

Read More

SAP UI5 application throws an error while using Tree map

Ali
Ali
Updated on 30-Jul-2019 251 Views

Note that SAP UI5 1.14 version supports Tree map and older version like 1.12 doesn’t have Tree map. You can try using below link: http://jsbin.com/aku-test-treemap-exists/1/edit?html,outputIt returns the code of tree map constructor, try loading your own copy sap-ui-core-js of UI5.

Read More

I have SAP UI5 application that I am not able to start after adding to SAP Fiori Launchpad.

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 30-Jul-2019 305 Views

This problem can be fixed by adding a / before application URL like this/sap/bc/ui5_ui5/sap/zstest/Ztest- shows name of application

Read More

How to set the first day of the week in sap.m.DatePicker's calendar?

mkotla
mkotla
Updated on 30-Jul-2019 197 Views

I don’t think there is any recommended way to access internal calendar in Datepicker. I would suggest you raise a function request in Openui5 using GitHub.

Read More
Showing 11–20 of 20 articles
« Prev 1 2 Next »
Advertisements