Found 20 Articles for SAP UI5

Using ControlAggregation in SAPUI5

Govinda Sai
Updated on 16-Dec-2019 06:40:35

846 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

Not able to call another function within initialize method of controller in SAP UI5.

Anil SAP Gupta
Updated on 17-Feb-2020 12:34:32

576 Views

Yes, you are absolutely correct. It is very basic thing, you just need to use this operator for making the function call.onInit: function() {    //Your logic    this.CustomFunction(); } CustomFunction : function () {   // some logic }

How to show only one view at a time in Wizard in SAP UI5?

Anil SAP Gupta
Updated on 17-Feb-2020 12:35:22

425 Views

I will say not it is not a big out of box requirement. You can easily get it done. What you need to do is to hook up your requirement in the complete event of the wizard which gets invoked on each step completion. You just need to hide the completed view and show the next view. So you will be viewing only one view at a time.onComplete: function(oEvent) {                 var wdStep = oEvent.getSource();                 wdStep.setVisible(false);             }

Rows with no data are visible after applying search in grid SAP UI5

Anil SAP Gupta
Updated on 17-Feb-2020 10:56:18

494 Views

The “No Data” rows are being shown in the grid irrespective of having no data is because of the “VisibleRowCount” attribute of the control. It controls the number of visible rows. So, once you are binding the table again after applying the filters, you need to update it dynamically to the number of rows in the matched result.Something similar to this −onBindingChange: function(oEvent) {     this.getView().byId("").setVisibleRowCount(oEvent.getSource().getLength()); }

OnInit method is not getting called again when navigating back and forth from a view in SAPUI5

Anil SAP Gupta
Updated on 17-Feb-2020 12:39:18

848 Views

You have identified the correct use case as it is by design as you have navigated back and forth, it renders the last version rendered and OnInit() does not gets called. But if you want to override this behavior, SAP lets you do it.You can delegate to the patternMatched event of router, so that wheever the view is rendered the OnInit() method is invoked.this.getOwnerComponent().getRouter().getRoute("").attachPatternMatched(, this);You need to attach the even handler to the router in the init method of the controller. Hope it helps and sorts out your requirement.

Using SSO logon tickets in SAPUI5

karthikeya Boyini
Updated on 16-Dec-2019 07:37:21

406 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;

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

mkotla
Updated on 30-Jul-2019 22:30:20

179 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.

Accessing element which is defined SAPUI5 application

Rahul Sharma
Updated on 25-Feb-2020 10:56:56

158 Views

You could try using the below code −var iconTabBar = sap.ui.getCore().byId("vwDetails--itabBar")

Passing to method geticon in SAPUI5

karthikeya Boyini
Updated on 12-Mar-2020 12:46:42

261 Views

SAP UI supports custom formatter functions. formatter="function" is used to specify a function to format cell data prior to display.formatter="function"Try using formatter function as below −icon : {    parts : ["answer"],    formatter : function(answerValue){       return self.getIcon(answerValue);    } }Refer below link to know more about custom formatter functions −https://sapui5.hana.ondemand.com/#/topic/07e4b920f5734fd78fdaa236f26236d8

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

Lakshmi Srinivas
Updated on 30-Jul-2019 22:30:20

286 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

Advertisements