Skip to content

Tag: sapui5

How to perform own action on F5 key press in UI5?

I don’t know how to replace the F5 key action in SAPUI5. I have a button “Refresh” which is reloading my business data in the UI and made some kind of manipulation before showing it on the view. I want to catch the F5-press so that my method to refresh can be called. Answer Just add an event listener to

How to use `oEvent` when loading fragment asynchronously?

I’m able to used oEvent when using this code: However, I’m trying to change it using Fragment.load but I’m not able to get the oEvent from the function. Any idea? Answer As explained in the linked answer above, the oEvent parameters are completely reset after the event handler (onPressDialog) is executed. I.e. after the fragment is fetched asynchronously, the oEvent

UI5 Odata read call with filter and urlParameters simultaneously

Hi I am trying to call Odata read with filter and parameters. But not able to get the data back. Any inputs would be appreciated Answer try removing the square brackets around oFilter in your code: filters: [oFilter], should be replaced by filters: oFilter, the filters attribute expects an Array of sap.ui.model.Filter. Your oFilter variable is already an array of

How can I call the attach / detach events with a named function?

I have a function which needs to attach and detach a handler to the event “requestCompleted” of the OData model to get the URL from the header in order to download the data as an Excel file. I am trying to detach the event afterwards to prevent snowballing of the event which causes the file to download n+1 times each

SAP UI5 :: drag and drop with links

I am looking for drag and drop with links like below gif. I have also checked this ::,output but linking the elements is not possible. Is it possible to have drag and drop with links in SAP UI5 ? Sample sampleImage Answer I found something useful for the same.SAP UI 5 uses D3.js which has drag and drop features.

Bind Association XSOData in UI5?

Let’s say I have Employee entity associated with Address entity in XSOData and I want to bind them to a single control – StandardListItem. How to achieve this? Associated address details available at Employee(’emp1′)/Address/ TIA. Answer If I understand correctly, the Address element is an entity. You cannot bind a property to a whole entity. I would assume that it

How to use an if-else condition in a SAPUI5 XML-View?

How can I implement an if-else condition in a XML-View in SAPUI5 that uses a flag (condition) from a JSONModel? So far I have a Controller: and a View: Edit: Is there a better way to do it than by implementing an overkill-feeling XML-Preprocessor? Answer OpenUI5 supports Preprocessing Instructions and Expression Binding. With Preprocessing Instructions you can do stuff like