sapui5

Hide Approve/Reject Buttons in Fiori Master Details Page

荒凉一梦 提交于 2021-01-29 18:02:17
问题 I am looking to hide the Approve/Reject Buttons in the Details Page of a Fiori App based on certain filter conditions. The filters are added in the Master List view (Left hand side view) thru the view/controller extension. Now, if the user selects certain type of filter ( Lets say, Past Orders) - then the approve/reject button should not be displayed in the Order Details Page. This is how I have defined the buttons in the Header/Details view this.oHeaderFooterOptions = { oPositiveAction: {

Manipulating control accessed with “byId” has no effect

谁说胖子不能爱 提交于 2021-01-29 16:14:34
问题 I have a sample of icons in a HBox in an XML view as below: <m:HBox> <core:Icon src="sap-icon://show" color="#007bff" id="test1" press="onPressView" /> <core:Icon src="sap-icon://edit" color="#007bff" id="test2" press="onPressEdit" /> <core:Icon src="sap-icon://print" color="#007bff" id="test3" press="onPressPrint" /> </m:HBox> In controller to set visible false , I am doing as: let testIcon1 = this.getview().byId('test1'); testIcon1.setVisible(false); But this isn't working. 回答1: You're

Start native Application from Tile in Fiori Launchpad?

半世苍凉 提交于 2021-01-29 12:32:27
问题 is it possible to start a native App on the device from the Fiori Launchpad? I would like to create a Tile that navigates the user to the native app on the device. 回答1: Answer for Android. Step 1. Ensure that your app opens with an URL. Say appname://screen . Refer How to launch app on click of url in android Step 2. In the Fiori Launchpad Tile Configuration, do not use "semantic object navigation. Instead, enter "Target URL" as appname://screen . 来源: https://stackoverflow.com/questions

smartfield annotation - valuehelp dropdown

假如想象 提交于 2021-01-29 04:34:42
问题 I have a value help field and want to see only descriptions (not codes) in the dropdown. After selection, want to store the code in another field which would be in hidden mode. For this, I have defined the following annotation: <Annotations Target="Metadata.CallReport/DivisionText"> <Annotation Term="Common.ValueList"> <Record Type="Common.ValueListType"> <PropertyValue Property="CollectionPath" String="CustomizingDivisionSet" /> <PropertyValue Property="Parameters"> <Collection> <Record Type

Cannot find name 'jQuery' error in controller.js

好久不见. 提交于 2021-01-28 18:36:51
问题 I am developing a UI5 app in VS Code. I added a new count function to the *.controller.js file, and in order to display the count from the server, I am using jQuery like in the following code: jQuery.each(this._mFilters, function (sFilterKey, oFilter) { oModel.read("/portfolios/$count", { filters: oFilter, success: function (oData) { var sPath = "/" + sFilterKey; oViewModel.setProperty(sPath, oData); } }); }); Unfortunately, I get the following error: Does anyone know why was the error

Required module missing methods

点点圈 提交于 2021-01-28 16:54:57
问题 Is it a bug from UI5 (1.60.2) or I am doing something wrong here? onSelectPreferredTreatment: function(event) { // ... const oDialog = new Dialog({/*...*/}); oDialog.open(); }, VM77446:1 Uncaught TypeError: oDialog.open is not a function at eval (eval at onSelectPreferredTreatment (Preview.controller.js?eval:NaN), :1:9) at f.onSelectPreferredTreatment (Preview.controller.js?eval:552) 回答1: Check the dependency list in your controller. The order of the required modules should reflect the order

UI5: change the style of list items after clicking on a button

蓝咒 提交于 2021-01-28 14:20:28
问题 I want to dynamically change the style of a sap.m.CustomListItem of my list when I click on a button. I used addStyleClass and it works only in the onInit method but not in the press` function, the style has been added but the view doesn't change. Controller pressbutton: function(oEvent) { var o = oEvent.getParameter("value"); MessageToast.show(o.toString()); var listitem = this.getView().byId("IDCustomerListItem"); if (listitem.hasStyleClass("myListItemClass")) { this.getView().byId(

How to programmatically create fragment using XML string

亡梦爱人 提交于 2021-01-28 13:36:51
问题 I have a string containing XML fragment definition, and I'd like to create a control using it. Example of an XML string: var sFrag = "<core:FragmentDefinition xmlns='sap.m' xmlns:core='sap.ui.core'> <Dialog showHeader='false' class='transparentBG dialogScrollHeight100' contentWidth='90%' afterClose='dialogAddNewAfterclose'> <content> <Button text='X' press='closeDialog'/> <Text text='Hello Meirav!'/> <HBox alignItems='Center'> <Label text='Product Name: '/> <Label text='{currentProduct>/Name}

How to programmatically create fragment using XML string

寵の児 提交于 2021-01-28 13:35:57
问题 I have a string containing XML fragment definition, and I'd like to create a control using it. Example of an XML string: var sFrag = "<core:FragmentDefinition xmlns='sap.m' xmlns:core='sap.ui.core'> <Dialog showHeader='false' class='transparentBG dialogScrollHeight100' contentWidth='90%' afterClose='dialogAddNewAfterclose'> <content> <Button text='X' press='closeDialog'/> <Text text='Hello Meirav!'/> <HBox alignItems='Center'> <Label text='Product Name: '/> <Label text='{currentProduct>/Name}

Transposing JSON data

梦想的初衷 提交于 2021-01-28 12:05:52
问题 I know there are threads on this, but I dont get it and might need help on my json file. I want to bind a json to one of my SAPUI5 controls, but I dont get it converted. The thing is, I got my data already in the frontend, so I dont want to make a second backend call and I need to transpose my json data. This is what I got, columns are Mon01 .. etc. Mon01 Mon02 Mon03 Mon04 0 03/2015 04/2015 05/2015 06/2015 1 1 3 5 21 2 2 4 6 22 3 10 11 12 23 This is what I want: Mon01 Mon02 Mon03 Mon04 0 03