sapui5

Javascript console output before and after method call with AOP

感情迁移 提交于 2019-12-22 13:49:11
问题 I would like to measure the computing time of methods. A nice way is (How do you performance test JavaScript code?) with console.time('Function #1'); and console.timeEnd('Function #1'); My idea is to add these console outputs on lifecycle-methods. In this case using SAPUI5 like createContent:funtion(){}; methods. This should be possible with AOP using before() and after() to runt the time counting. Which AOP framework would you suggest and how to implement it with the need of modifying the

How to make text appear fully in IconTabBar?

不想你离开。 提交于 2019-12-22 11:05:40
问题 I am using IconTabBar in my application and the text (heading for the tab) is not displaying fully. Half of the text gets cut. <IconTabBar class="sapUiResponsiveContentPadding"> <items> <IconTabFilter icon="sap-icon://approvals" text="Set Values for Mass Change" design="Horizontal" > <mvc:XMLView viewName="abc.view.selectionPage"/> </IconTabFilter> <IconTabSeparator icon="sap-icon://open-command-field"/> </items> </IconTabBar> So here the text, which should be "Set Values for Mass Change", is

404 Error when calling for the metadata using WEB API OData v4

不羁的心 提交于 2019-12-22 10:44:00
问题 I have tested the the call to the $metadata using postman and have found that when the MaxDataServiceVersion header is supplied the service always returns a 404 error. I have other posts about this using Breeze, but the best answer I can find simply says to comment out the line that adds this header. We are using SAPUI5 ODataModel in our client application and commenting out that header is not an option. Web API Config: ODataConventionModelBuilder builder = new ODataConventionModelBuilder();

Force clear cache in OpenUI5

眉间皱痕 提交于 2019-12-22 00:14:27
问题 I have created an OpenUI5 app and I want to relase a new version daily. But I found some problems: Not always on the client browser is loaded the last version of javascript (I have a label that show the version and to see the last number is requred a manual refresh by F5) I have a JSon file that i use to bind a menu. If I modify it, on the client browser it remains in cache and also with F5 not load the new version. The solution is clear data of browser (...) Now I have this meta-tags on my

Fiori — Cross application navigation; Handling startup parameters?

回眸只為那壹抹淺笑 提交于 2019-12-22 00:10:33
问题 This question is related to: Fiori - Cross Application Navigation http://help.sap.com/saphelp_uiaddon10/helpdata/en/07/9561b716bb4f2f8ae4e47bacbdb86d/content.htm Remove URL params on routing My use case is like this: I have multiple applications that should link to others (deep). Since documentation of cross navigation mention to avoid deep links I decided to use a startup parameter. For example: Application A has a list of some items in the detail view of one item there is a reference to

Get Selected Item Details

拜拜、爱过 提交于 2019-12-21 21:18:02
问题 I am using the sap.m.ObjectListItem as my list items to which I have bound JSON data from an API. However, I can't find a way to get the selected item from the list when I press on an item. Even getting the key of that item would be helpful. <List id="ObjectList" itemPress=".onPressDcData" items="{DC>/}" > <ObjectListItem type="Active" title="{DC>Name}" /> </List> 回答1: The following should be placed in your respective controller (but I guess you already have implemented something similar)

Promise.resolve with no argument passed in

 ̄綄美尐妖づ 提交于 2019-12-21 09:19:23
问题 In the OpenUI5 code-base I came across this snippet: // Wait until everything is rendered (parent height!) before reading/updating sizes. // Use a promise to make sure // to be executed before timeouts may be executed. Promise.resolve().then(this._updateTableSizes.bind(this, true)); It looks like the native Promise function is being used, with no argument being passed to it's resolve function which takes an: Argument to be resolved by this Promise. Can also be a Promise or a thenable to

How to handle Drag and drop from ListBox in SAPUI5?

亡梦爱人 提交于 2019-12-21 06:38:13
问题 I could find that drag and drop are supported in SAPUI5. But I am not able to implement the same in my app. I tried to bind to the dragstart and dragleave events, they are not working. I even tried to example provided in the other threads(http://jsbin.com/qova/2/edit?html,output). This example is also not working. I can select the list item, but when I try to drag, the selection just extends and nothing happens. Please let me know if I am doing anything wrong. Here is the HTML Snapshot Source

Access row for styling in SAP UI5 template handler using JQuery

寵の児 提交于 2019-12-21 06:37:09
问题 I'm trying to get UI5 to change the row backgound based on the value of a field. This works after the initial load has been done and you scroll, but it doesn't work on the initial load. This isn't working because the cell hasn't been added to its parent container as far as I can tell this.$().closest('tr') returns nothing. Upon scrolling the cell has been added to its parent, and then everything woks just fine. <!DOCTYPE html> <html><head> <meta http-equiv='X-UA-Compatible' content='IE=edge'

How to reuse SAPUI5 views?

白昼怎懂夜的黑 提交于 2019-12-21 06:28:06
问题 I created a header for one SAP UI5 page, now I want to have a similar header with almost the same components in another page. So, for the sake of code reuse I tried to: put the header within a separate UI5 view create this header instance with var pageHeader = sap.ui.jsview("appHeader","view.appHeader"); add the pageHeader as content to the page in the customHeader field But this did not work, without given any errors! So is it possible to reuse custom UI components via a view and if yes how