sapui5

Error “Cannot add direct child without default aggregation defined for control …”

二次信任 提交于 2020-02-25 13:27:08
问题 I am getting the error "Cannot add direct child without default aggregation defined for control sap.m.Label". Not sure what this means. Here is my fragment: <core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:f="sap.f"> <ResponsivePopover id="popover" title="{Name}" class="sapUiPopupWithPadding" placement="Bottom"> <beginButton> <Button id="submit" text="{i18n>submit}" press="onSubmit" class="sapUiTinyMargin"/> </beginButton> <content> <f:GridContainer> <f:layout> <f

How to place icon next to or within input field

一曲冷凌霜 提交于 2020-02-25 04:00:51
问题 How I can put my icon next to or within the input field? The problem is, the icon changes the form. Usually, it's like this: But when I'm adding the icon (code below), it displaces the Dauer input Field. Is there a way to make it look clean and that's next to it? Or better in the input field inside? I can make the button smaller with CSS but there is still a gap between them.. And it does not move automatically. The best solution is like the Datum above with a small icon inside where I can

UI5: How to access html element defined inside view?

匆匆过客 提交于 2020-02-24 10:42:47
问题 I have a UIComponent with this view: <mvc:View controllerName="my.components.webmap.controller.Map" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:html="http://www.w3.org/1999/xhtml"> <html:div id='myDiv' style='height:inherit'></html:div> <Button id="helloWorld" text="Say Hello" press=".onShowHello" /> </mvc:View> In the View controller, I can get the Button and its id from this.getView().byId("helloWorld").sId but I can't get the ID of the div using the byId() method. this.getView().byId(

UI5: How to access html element defined inside view?

给你一囗甜甜゛ 提交于 2020-02-24 10:42:05
问题 I have a UIComponent with this view: <mvc:View controllerName="my.components.webmap.controller.Map" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:html="http://www.w3.org/1999/xhtml"> <html:div id='myDiv' style='height:inherit'></html:div> <Button id="helloWorld" text="Say Hello" press=".onShowHello" /> </mvc:View> In the View controller, I can get the Button and its id from this.getView().byId("helloWorld").sId but I can't get the ID of the div using the byId() method. this.getView().byId(

Chrome sources not showing a file that was generated from Typescript and has a source map

笑着哭i 提交于 2020-02-23 05:21:59
问题 I have a file that is dynamically loaded by sapui5 as a controller. I have altered my code so that I can leverage Typescript for Intellisense and fault detection. My JS file is successfully created, and runs correctly in Chrome. The DevTools/Sources/Network window does not list my 'FinalAssembly.controller.js' file, nor does it list the similarly named 'FinalAssembly.controller.ts' file. I have found that if I remove the '//# sourceMapURL=' line from the bottom of my file, Chrome will

How to Use D3 elements inside SAP UI5 , when using JS views?

徘徊边缘 提交于 2020-02-03 10:46:45
问题 Suppose we want to use D3 JS library data visualization ability and use it inside SAP UI5 application , ( already using VIZ library which is based on D3 in sap.m but want to have more elements and more capabilities to represent data ) Is it possible and advisable ? If yes ,then are there any other framework based on D3 library which can be utilized to do the integration as SAP UI5 is a object oriented framework and writing D3 code inside the view is not working ? Find below the failed trial

SAPUI5 model sorter sort responsive table by multiple columns

谁都会走 提交于 2020-01-30 07:54:08
问题 Hi I have a responsive table with data and I need to sort it using the following two columns PONumber PO Line The problem is the model sort is only working with a single property. How to sort the table data by the above order. This is my view <m:Table id="podetailstable" items="{ path: '/PODetails' , sorter: { path: 'PoNumber' } }"> <m:columns> <m:Column> <m:Text text="{i18n>poDetails_tablecol_PoNumber}"/> </m:Column> <m:Column> <m:Text text="{i18n>poDetails_tablecol_PoLine}"/> </m:Column> <m

Set the value of a global variable in a function

拟墨画扇 提交于 2020-01-26 03:59:05
问题 I'm currently working on an SAP Fiori app that consumes an OData service. I created a method in my controller fonct that calculates a variable coming from my OData. I want to capture this value and put it in a global variable every time the view is refreshed. I created a global variable like this: var boo1; return Controller.extend("com.controller.Detail", {...}); and I passed boo1 as a parameter in my method fonct inside my onInit method but it is undefined . Here's a snippet of my

SAPUI5: How to use external library in controller?

北战南征 提交于 2020-01-25 23:22:38
问题 In my index.html file I have the following code: <script> sap.ui.getCore().attachInit(function() { jQuery.sap.registerModulePath("lodash","https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min"); jQuery.sap.require("lodash"); new sap.m.Shell({ app: new sap.ui.core.ComponentContainer({ height : "100%", name : "sap.com.ml.docservicedoc-service-m-learning" }) }).placeAt("content"); }); How can I now use lodash in one of my controllers (not view)? I tried: sap.ui.define([ "sap/ui/core/mvc

SAPUI5: How to use external library in controller?

China☆狼群 提交于 2020-01-25 23:22:02
问题 In my index.html file I have the following code: <script> sap.ui.getCore().attachInit(function() { jQuery.sap.registerModulePath("lodash","https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min"); jQuery.sap.require("lodash"); new sap.m.Shell({ app: new sap.ui.core.ComponentContainer({ height : "100%", name : "sap.com.ml.docservicedoc-service-m-learning" }) }).placeAt("content"); }); How can I now use lodash in one of my controllers (not view)? I tried: sap.ui.define([ "sap/ui/core/mvc