sapui5

Page breaks in SAPUI5

为君一笑 提交于 2020-01-06 18:06:09
问题 What is the best practice for creating specific page breaks in SAPUI5 and is it actually possible? Classical CSS atributes page-break-after and page-break-before doesn't seem to work in my case. For example, I have two sap.m.VBox elements and I attached them a CSS class which specifies page-break-after: always !important; when printing, but nothing happens. If I add * {overflow-x: visible !important; overflow-y: visible !important;} then it will break and continue to draw the content in next

Fire BarcodeScannerButton after View loads

筅森魡賤 提交于 2020-01-06 17:46:23
问题 I have implemented a scanner button on my Fiori/UI5 application. I used sap.ndc.BarcodeScannerButton and created that button on the controller (I cannot seem to create the button on my view.xml). Anyway, I need to fire this button after the view loads. I have a master-detail application. The scanner button is on the master view ofcourse. First thing I did was call the button itself. But my first problem is that the button does not accept an id as a parameter. It tells me that app cannot

SapUi5 Table Multiple Filter

感情迁移 提交于 2020-01-06 16:20:00
问题 I'm developing a sap ui5 application using sap.ui.table.Table. I need to apply a filter based on multiple strings. For example, if the user input is an array like: ["Stack", "Overflow"] I need: Filter all table fields by "Stack" ; Filter the result of point 1 by "Overflow" ; the result will be all rows that have "Stack" and "Overflow" , no matter the field. Does anyone have a solution? 回答1: As per the sap.ui.model.Filter documentation, you can create a filter either based on a filter info

SAPUI5 Pass data from one view to another view

丶灬走出姿态 提交于 2020-01-06 14:45:53
问题 I am developing of a SAPUI5 application, in my application I need to pass data from one View1 to View2. I follow some sample code from internet but it seems like does not work for me. The following is my source code View1.controller.js onShoppingCartPressed: function(){ var viewCartData = { "Customer" : SelectedCustomer, "Salesman" : SelectedSalesman, "TxnKey" : "TXN1000103" }; this._oRouter.navTo("ViewCarts", viewCartData); } View2.controller.js onInit: function () { this._oRouter.getRoute(

Filter expanded OData request

孤者浪人 提交于 2020-01-06 08:52:36
问题 I need to pass a parameter to the backend. I want to use $filter for this. My code below is not working, there are no filters returned by io_tech_request_context->get_filter( )->get_filter_select_options( ) in the Figures entityset. var aFilters = [ new sap.ui.model.Filter("TeamMembers/Figures/FILTERKEY", sap.ui.model.FilterOperator.EQ, sFilterValue) ]; this.getView().bindElement({ path: "/TeamDataSet('0')", parameters: { expand: 'TeamMembers/Figures' }, filters: aFilters }); 回答1: Element

Filter expanded OData request

試著忘記壹切 提交于 2020-01-06 08:52:21
问题 I need to pass a parameter to the backend. I want to use $filter for this. My code below is not working, there are no filters returned by io_tech_request_context->get_filter( )->get_filter_select_options( ) in the Figures entityset. var aFilters = [ new sap.ui.model.Filter("TeamMembers/Figures/FILTERKEY", sap.ui.model.FilterOperator.EQ, sFilterValue) ]; this.getView().bindElement({ path: "/TeamDataSet('0')", parameters: { expand: 'TeamMembers/Figures' }, filters: aFilters }); 回答1: Element

How to Get the Data from Navigation Property of OData Service

一笑奈何 提交于 2020-01-06 06:26:07
问题 We are creating the Master Details UI5 app. I am calling the OData service and able to display the data from an entity set in Master list. On detail section, we are creating a form and I want to display the data which is coming from Navigation entity set. As I came to know that we can not call navigation entity set in a single call, how can it be done? <EntityType Name="Product" sap:content-version="1"> <Key> <PropertyRef Name="ProductID"/> </Key> <Property Name="ProductID" Type="Edm.String"

How to Get the Data from Navigation Property of OData Service

前提是你 提交于 2020-01-06 06:25:33
问题 We are creating the Master Details UI5 app. I am calling the OData service and able to display the data from an entity set in Master list. On detail section, we are creating a form and I want to display the data which is coming from Navigation entity set. As I came to know that we can not call navigation entity set in a single call, how can it be done? <EntityType Name="Product" sap:content-version="1"> <Key> <PropertyRef Name="ProductID"/> </Key> <Property Name="ProductID" Type="Edm.String"

How to achieve same like Segemented button with toggle button(sugg) ,change to next onclicked

為{幸葍}努か 提交于 2020-01-06 06:12:26
问题 As learnt from previous question of mine(how to change segmented button to next on clicked) , I used a Segmented button to do so as: My expected results were: when Next is pressed INDICATOR2 should be active and on second press INDICATOR3 should be active. when on INDICATOR2 if Previous is pressed both INDICATOR2 and INDICATOR1 (which is current one) should be active. As I am using segmented button here, the 2) can't be achieved ,and also was suggested using a toggle button would do instead a

SAP UI5 table's column sorting is lost after table model is refreshed

半世苍凉 提交于 2020-01-06 04:34:13
问题 I have a table (sap.ui.table) and all its column have sorting. In the table, one of the columns has a button for changing and saving the value of its cell. On saving, I want to update the table model with new data. If I have sorted by PO number column, and the table refreshes, then the table is not again sorted in PO numbers, but it is reset to the stockroom name column sort which is default one. How to ensure the sort that was applied to any of its column retains after model refresh? XML