sapui5

Personalization table in SAPUI5

我怕爱的太早我们不能终老 提交于 2019-12-25 18:42:51
问题 I saw an this expamle, and I want to play it at me. This is my xml view: <Panel> <content> <Button press="onPersoButtonPressed" class="btn editTable"></Button> </content> </Panel> <Table id="Listing" class="tableList" mode="MultiSelect" items="{path: 'masterData>/contactsList'}"> <columns> <Column minScreenWidth="Tablet" demandPopin="true"> <Text text="{i18n>vendorNum}"/> </Column> <Column minScreenWidth="Tablet" demandPopin="true"> <Text text="{i18n>recipientType}"/> </Column> <Column

How to filter DateTime data using sap.ui.model.Filter?

早过忘川 提交于 2019-12-25 18:38:49
问题 I've tried to filter DateTime data using sap.ui.model.Filter: oTableSearchState = [new Filter([ new Filter("Date", FilterOperator.Contains, sQuery), new Filter("Another_Date", FilterOperator.Contains, sQuery), ])] it return 400 Bad String . I found that the odata request is ...$filter substringof(,Date) . So I know it's not correct that using a "string filter" to filter date. what I need is ...$filter= Date ge datetime'2016-08-17T16:00:00Z' and Date lt datetime'2016-08-18T16:00:00' Can I do

How to filter DateTime data using sap.ui.model.Filter?

混江龙づ霸主 提交于 2019-12-25 18:38:07
问题 I've tried to filter DateTime data using sap.ui.model.Filter: oTableSearchState = [new Filter([ new Filter("Date", FilterOperator.Contains, sQuery), new Filter("Another_Date", FilterOperator.Contains, sQuery), ])] it return 400 Bad String . I found that the odata request is ...$filter substringof(,Date) . So I know it's not correct that using a "string filter" to filter date. what I need is ...$filter= Date ge datetime'2016-08-17T16:00:00Z' and Date lt datetime'2016-08-18T16:00:00' Can I do

Use insertItem after bindAggregation in Sap.m.Select

南笙酒味 提交于 2019-12-25 16:36:59
问题 Is my first time posting here. I have a sap.m.Select that shows the Years from oDataModel using "bindAggregation" method. My idea is to create a extra Item in the Select with text: "All Values" and Key: "*", So I tried to use the "insertItem" after the "bindAggregation", but the item that I created didnt appear in the Select list of items, only the Years from oDataModel. Here is the code: var yearSelectBox = this.getView().byId("idYearSelectBox"); yearSelectBox.setModel(new sap.ui.model.odata

What is the replacement for metadataLoaded in JSON model?

本小妞迷上赌 提交于 2019-12-25 15:31:09
问题 In sap.ui.model.odata.v2.ODataModel, there is a metadataLoaded method which I can use it like this: this.getModel().metadataLoaded().then( function() { var sObjectPath = this.getModel().createKey("/", { ID : sObjectId }); this._bindView("/" + sObjectPath); }.bind(this)); in JSONModel, it seems no corresponding method since there is no metadata in JSONModel, so is there any other work around? I tried attachRequestCompleted not working. function bindview() { that._bindView(sObjectId); } this

OPA matcher for sap.m.MessageToast.show call?

若如初见. 提交于 2019-12-25 12:09:41
问题 How does a OPA match pattern for a sap.m.MessageToast.show call looks like? I looked into the Code of sap.m.MessageToast.show and assumed the use control is sap.ui.core.Popup . Therefore I tried the following matcher: iShouldSeeAToastMessage : function() { return this.waitFor({ controlType : "sap.ui.core.Popup", success : function (aDialog) { ok(true, "Found a Toast: " + aDialog[0]); }, errorMessage : "No Toast message detected!" }); }, Is the controlType correct? How could the matcher

How do I use Binding path/context to build (multi-page app) using a single view / controller?

混江龙づ霸主 提交于 2019-12-25 11:54:23
问题 I'm building a create survey / questionnaire app, where each question has the exact same format bound to a model. Is it possible to do this with one controller + view and simply manipulate the binding context/path? I've created a single view for this in SAP WEB IDE. When I go click on the "Add New question" button, (to display the input for Question 2) how exactly do I setup the new binding path/context to accept data for it? 来源: https://stackoverflow.com/questions/46115723/how-do-i-use

How use multiples properties on “expand” parameter in List component [sapui]

喜欢而已 提交于 2019-12-25 09:42:59
问题 I have a sap.m.List component where invoke a list of OData objects. This object have others object inside it. For this reason, I use expand parameter for accessing to propertis of intern object. But when I put multiples objects on "expand" parameter, list component doesn't work: This way doesn't work: <List id="lstRequest" headerText="Custom Content" items="{ path: '/Requests', parameters: { expand: ['RequestTypeDetails', 'UsersDetails'] } }" > <StandardListItem title="{RequestTypeDetails

Column level sum/aggregation in SAPUI5 GridTable

我与影子孤独终老i 提交于 2019-12-25 09:19:41
问题 I need to sum/aggregate of finance data at the bottom of Column in SAPUI5 GridTable . I am populating finance data from SAP HANA based odata services but the service can not provide Total at the bottom of data set. Hence my GridTable not showing Total. Can you please provide sample code or idea how I can calculate and show Total in UI5 application? 回答1: You can use method: attachRequestCompleted of the model and then find the sum by looping over the data. 来源: https://stackoverflow.com

SplitApp on portrait mode. Show 1st view instead of the 2nd view

╄→гoц情女王★ 提交于 2019-12-25 09:11:40
问题 On UI5 and FIORI SplitApp application, whenever users are viewing the app on portrait mode on their devices, the first screen that is being shown is the 2nd view/screen. Is it possible to bypass this behavior (but still using splitapp) so the on load of the application, users will see the 1st screen of the split app? Thanks! 回答1: Switch your targets in your manifest.json (or wherever you are defining your routes ) "routes": [{ "pattern": "", "name": "master", "target": ["home", "master"] }, {