sapui5

Event for view leave

浪子不回头ぞ 提交于 2020-01-14 10:48:11
问题 I declared a controller for a view in my SAPUI5 application. Now I want to perform tasks when the view is left by the user. There is already a possibility to add a callback function to attachRoutePatternMatched to perform tasks when the view is navigated by the user now I need a equivalent function to handle a leave of the view. I use a SplitContainer as parent container onInit: function() { this._oRouter = this.getOwnerComponent().getRouter(); this._oRouter.attachRoutePatternMatched(this.

How is the GENERATED_ID created in a custom oData Service to feed an Analytical Table?

时光总嘲笑我的痴心妄想 提交于 2020-01-14 06:12:16
问题 In a custom oData Service I need an Entity that will feed an analytical Table in sapui5. The table should show the sum of the VBELN positions. The Entity collects already the VBELN positions and all the needed supplementary attributes and the data can be displayed in sapui5 in a Responsive Table. Now this Table has been changed to an analytical table and the annotations for aggregation, dimensions and measures were done in the DEFINE method of the MPC_EXT class. In SEGW a mapping was done

How to Stretch sap.m.ScrollContainer Over The Remaining Page Space in SAPUI5?

别说谁变了你拦得住时间么 提交于 2020-01-14 05:54:08
问题 have a page with disabled scrolling. page contains in it's content two sap.m.Table. one table for the sake of a fixed header. it contains just columns. other table inside a sap.m.ScrollContainer's content. it contains the items. use case is that the items do not fit the screen's height. without a scroll container the items would fall over the screen's bottom. page scrolling is still disabled. now i'd like that the scroll container jumps in. and it should exactly fill out the remaining page

Page Is Blank Without Throwing Any Errors

余生长醉 提交于 2020-01-14 05:09:07
问题 I am trying to display few tiles in a tile container which fetches data from a dummy JSON file. I have coded exactly shown in this sample. But my page appears empty. Also it doesn't show any errors in the console. Below are the snippets of my code. View1.controller.js sap.ui.define([ "sap/ui/core/mvc/Controller" ], function(Controller) { "use strict"; return Controller.extend("AdminMovie.controller.View1", { }); }); View1.view.xml <mvc:View displayBlock="true" controllerName="AdminMovie

SAPUI5 routing - Control with ID idAppControl could not be found

时光毁灭记忆、已成空白 提交于 2020-01-13 18:17:12
问题 first at all, I´m aware that there were similiar asked questions, but none of the answers could solve my problem. Short look into my code: My Component.js looks like this routes: [ { pattern: "", //home page name: util.Constants.Tile, view: util.Constants.Tile, viewId: util.Constants.Tile, targetAggregation: "pages" //targetControl: "idAppControl" }, { pattern: "firstExample", name: util.Constants.FirstExample, view: util.Constants.FirstExample, viewId: util.Constants.FirstExample,

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

社会主义新天地 提交于 2020-01-13 08:21:41
问题 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 : sap.ui.define([ "sap/ui/core/mvc/Controller", "sap/ui/model/json/JSONModel" ], function (Controller, JSONModel) { "use strict"; return Controller.extend("sap.ui.demo.myApp.myController", { onInit: function () { //// set data model on view var oData = { title: "A cool title", values: [{name: "Text 1", marketed: true}, {name: "Text 2", marketed: false},

SAPUI5: Output formatted date

三世轮回 提交于 2020-01-13 05:50:16
问题 I´ve developed an SAPUI5 application with an XML-View. Now I want to format a date correctly. I tried it the following way: <Text text="{ path: 'model>LastCommDate', type: 'sap.ui.model.type.Date', formatOptions: { pattern: 'yyyy/MM/dd' } }" /> Error message: datajs.js:17 Uncaught TypeError: j.getTime is not a function Without the formatOptions and type I get the unformatted output. <Text text="{ path: 'model>LastCommDate' }" /> Output: 2015-06-16T00:00:00 EDIT: Same question for Time : How

What is the usage of the “dependents” aggregation?

99封情书 提交于 2020-01-13 02:47:31
问题 What is the real world usage of the "dependents" aggregation in SAPUI5. This was added in version 1.9. What problem does it solve? I couldn't find much documentation in the SCN site on this. 回答1: It's to connect otherwise 'orphan' UI elements so they can partake of the databinding available to e.g. a view. It's especially relevant when you instantiate a dialog, e.g. from a fragment, in a view's controller. The dialog won't automatically have the models that are set on the view available to it

How to map model to table when the structure is array based?

旧城冷巷雨未停 提交于 2020-01-11 13:04:17
问题 I have my data as following: { meta: { format: "csv", info: "desc", columns: [ { id: "Name", type: "Text", length: 32 }, { id: "Text", type: "Text", length: 128 }] }, rows: [ ["John","xxxx"], ["Alpha","yyyy"], ["Beta","wwww"], ["Gamma","zzzz"]] } Now, I am struggling to map the records to a Table control as Columns and Rows . Column seems straight forward, straight map, but the rows since lacks a mapping to column I wonder what could be the simplest way. Approach Steps: Make a keys[] from

SAPUI5 - Hiding a table column? [closed]

微笑、不失礼 提交于 2020-01-07 09:50:06
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 12 months ago . I have a a table rendered from an xml view. Is there a way I can hide an entire column in the controller? 回答1: For the record, there are two Table controls in SAPUI5: sap.m.Table and sap.ui.table.Table For both you can set the visible property of a Column to false to hide that