sapui5

sapui5 pass parameter to value help dialog of smartFilterBar ControlConfiguration

隐身守侯 提交于 2019-12-25 08:58:39
问题 I have SmartFilterBar on my page based on oData service. One of filterable fields has value help dialog. When value help dialog opened i need to fill one of search parameters in this value help dialog. How can i do this? I can't get value help dialog by control because "byId() method" i don't now id of created dialog. 回答1: I found the solution: how can I get id of opened valuehelpdialog: In the event "onValueHelpRequest" of I redigine "onAfterRendering" method of class "sap.ui.comp

SAPUI5 Routing - Difference between controlId and targetControl

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 08:47:07
问题 In my routing configuration I can either set the property " controlId " or " targetControl " to specify the ID of the control where I want to put my new view. The only difference I figured out so far is that it seems that " controlId " has a higher priority. Means: If I specify both controlId is used. Despite that, is there any difference between these keys or are they synonyms? The same goes for " targetAggregation " and " controlAggregation "? I've read a lot of SAP documentation but I

Fiori Launchpad HCP launch shell plugin before create component

我怕爱的太早我们不能终老 提交于 2019-12-25 08:41:32
问题 Introduction I am running a testshell project as "Shell plugin" in the HANA Cloud Platform Fiori Launchpad . When I visit the Launchpad in the default front page (with all the tiles), the shell plugin is loaded right. My shell plugin modifies some things in the navigation URL's, so I must ensure, that the shell plugin is loaded before the applications ' Component.js is loaded. Problem But, when I start the Fiori Launchpad with a specific intent (for example https://HCP_URL/hrtest#requestleave

Extending sap.ui.core.Icon with hover event or mouseover

こ雲淡風輕ζ 提交于 2019-12-25 08:38:58
问题 I extended sap.ui.core.Icon with hover event handling: sap.ui.define(function () { "use strict"; return sap.ui.core.Icon.extend("abc.reuseController.HoverIcon", { metadata: { events: { "hover" : {} } }, // the hover event handler, it is called when the Button is hovered - no event registration required onmouseover : function(evt) { this.fireHover(); }, // add nothing, just inherit the ButtonRenderer as is renderer: {} }); }); The event onmouseover is never fired. I also used this extension

Uncaught (in promise): Error Cannot instantiate object new is missing

佐手、 提交于 2019-12-25 08:25:03
问题 I have a controller: Menu.Controller.js: sap.ui.define([ "sapit/ext/utils/BaseController", "sap/ui/model/json/JSONModel", "sap/ui/model/Sorter", "sap/ui/model/Filter", "sapit/nova/model/constants", "sapit/ nova /model/formatter", "sapit/ nova /util/Helper", "sapit/ nova /util/Validator", "sapit/ nova /util/ItemService" ], function(BaseController, JSONModel, Sorter, Filter, constants, formatter, Helper, Validator, ItemService) { "use strict"; return BaseController.extend("sapit.nova.controller

SAPUI5 - Mock Server Automated Fallback Config

馋奶兔 提交于 2019-12-25 08:03:15
问题 I am struggling to figure out a solution for a situation when I start my sapui5 application then based on manifest.json configuration application should start mock server when there is no connection for OData else call OData service. Right now I have mockserver.html which start mock server and index.html for application. Is it even possible what I am asking? Thanks 回答1: The mock server intercepts the URL you are specifing at mock server instantiation. Simply check the availability of your

Binding in List with XML

房东的猫 提交于 2019-12-25 07:59:13
问题 I want to use only XML to bind a list to the data of a JSON file. Here is my code: XML View: <List headerText="Positions" items="{/Positions}"> <ObjectListItem title="{positions>id}"> </ObjectListItem> </List> index.html var oPositionsModel = new sap.ui.model.json.JSONModel(); oPositionsModel.loadData("model/Positions.json"); sap.ui.getCore().setModel(oPositionsModel); model/Positions.json { "Positions": [ { "id": 123456, "article": "Abcde", "amount": 12 }, { "id": 654321, "article": "Edcba",

Export Excel (.xlsx extension) file with includes responsive table data in SAPUI5

穿精又带淫゛_ 提交于 2019-12-25 07:49:21
问题 In my current job, i had a requirement in SAPUI5 to download Table/list/etc control's data into .xlsx excel file extension (not .csv extension). Please guide me with some good examples or concept. Thanking you in advance. 回答1: I have found one solution to download .xlsx file in sapui5 . Please feel free to provide feedback on my work. First get the data from table/list controls and use below code to generate .xlsx file in sapui5. some_etc_controller.js var aExcelData = [ { "ProductId":

Lazy loading data after initial load

▼魔方 西西 提交于 2019-12-25 07:22:56
问题 In section 10 of the OpenUI5 Developer Guide tutorial on routing (see here), it talks about lazy loading. However the tutorial does not show how to lazy-load data. Scenario: I have an OpenUI5 app that gives a list of employees and on a detail page shows the main employee details and gives access to further info, projects, hobbies, and notes from the selected employee's resume. Because in 99.99% of the use cases a user will not wish to look at hobbies, I will prefer not to load hobbie data

Remote and local OData service

感情迁移 提交于 2019-12-25 04:34:11
问题 How can I configure manifest.json file so when I run mockserver(mockserver.html) then it goes to the local json data and when I run index.html (main entry to application) then it goes to the remote service. I have a sample manifest.json file from the documentation but not very clear how remote and local service come into play. { "_version": "1.1.0", "sap.app": { "_version": "1.1.0", "id": "xxx", "type": "application", "title": "{{appTitle}}", "description": "{{appDescription}}",