sapui5

How to set filter in table dropdown based on table row data

我的未来我决定 提交于 2020-01-01 17:12:49
问题 The following question was driven by this SAPUI5 topic on SCN: 2 dropdownboxs, filtering second off the the value in first We have a SAPUI5 table, containing two columns, each record in the table shows a dropdown: one for Divisions, and one for Business Units. Depending on the value of the selected Division, the Business Unit dropdown should only show the BU's which are valid for the chosen division The actual table data is stored in a named model tablemodel , the data for the dropdowns is

Add a picture to each Radio Button in Radio Button Group

五迷三道 提交于 2020-01-01 08:35:53
问题 I want to implement a Radio Button Group where every Radio Button will have a picture next to it (on the left side of the radio button). Is that possible? If so, how? html: <div class="form-group" show-errors> <label class="col-md-2 control-label metric-light-16-black pay-form-label">Payment Method</label> <div class="col-md-10" id="rdPaymentMethod"> <label class="radio-group col-md-2"> <span id="radio-group-1" style="margin-left: 0cm;"></span> <span class="radio" style="margin-left: 0cm;" />

Best practice to handle focus event for input fields

Deadly 提交于 2019-12-31 05:00:08
问题 Sadly, I don't find any focus event for sap.m.Input/.TextArea to which I can register handlers in XML view. What are your best practices e.g. if you have nearly 100 fields and most of them should handle focus event so that the text within the input field gets automatically selected? Normally, I try to avoid to register the focusin handler in controller on every input field (also looping)... but it seems that there are no other possibilities available isn't it? What I want is a possibility,

Duplicate ID error when creating fragments in different Controllers

余生颓废 提交于 2019-12-31 04:30:28
问题 So... I'm building an application that is basically a CRUD. On this application, I have the following views / controllers: VisitEdit and RequestNew . At the RequestNew controller, I have a function that handles the press of a button: onRequestNewAddCustomerPress: function(oEvent) { if( !this.oAddCustomerDialog ){ this.oAddCustomerDialog = sap.ui.xmlfragment("com.sap.lccapp.fragment.AddCustomer", this); } this.oAddCustomerDialog.openBy(oEvent.getSource()); }, And I have at this same Controller

UI5 Mock Server with Local Data: “rootUri” Not Working

為{幸葍}努か 提交于 2019-12-31 04:02:57
问题 I'm currently following the UI5 tutorial and am stuck on step 27: Mock Server Configuration. The problem is the rootUri configuration of the mock server. I am using the Northwind OData service as per tutorial and have configured a dataSource for Invoices in the manifest.json . Now, to use the local mock data instead of the online service, I created the necessary files as stated by the tutorial. When I then run the mockServer.html , the server doesn't redirect the service request to the local

OData Edm.DateTime - How to Display Date Only

三世轮回 提交于 2019-12-31 02:44:14
问题 In UI5, my OData is returning the date in the following format: Mon Apr 09 2018 01:00:00 GMT+0100 (GMT Daylight Time) I would like to format it to: 09/04/2018 I have tried the following without any results: <Text text="{ path: 'MyoDataService>ExecuteDay', type: 'sap.ui.model.type.Date', formatOptions: { pattern: 'yyyy/MM/dd' } }"/> Another example I have tried and It is not working neither: <Text text="{ path:'MyoDataService>ExecuteDay', type: 'sap.ui.model.type.Date', formatOptions: { source

When to use jQuery.sap.registerModulePath() with an example?

走远了吗. 提交于 2019-12-30 10:17:19
问题 I have tried reading the SAPUI5 documentation for the above but I am not able to clearly understand its usage. Also what is the difference between sap.ui.localResources() and jQuery.sap.registerModulePath() and when to use what? If someone can explain with an easy example it will be really helpful. Also can we use jQuery.sap.registerModulePath() to load mockData? 回答1: If you were using resourceRoots either in the bootstrap config or in the app descriptor, you've been using jQuery.sap

When to use jQuery.sap.registerModulePath() with an example?

南楼画角 提交于 2019-12-30 10:16:22
问题 I have tried reading the SAPUI5 documentation for the above but I am not able to clearly understand its usage. Also what is the difference between sap.ui.localResources() and jQuery.sap.registerModulePath() and when to use what? If someone can explain with an easy example it will be really helpful. Also can we use jQuery.sap.registerModulePath() to load mockData? 回答1: If you were using resourceRoots either in the bootstrap config or in the app descriptor, you've been using jQuery.sap

How to dynamically load an XML fragment in XML view?

戏子无情 提交于 2019-12-30 06:50:48
问题 Suppose I have the following XML view: <mvc:View xmlns:mvc="sap.ui.core.mvc" ...> <Page> <content> <l:VerticalLayout> <l:content> <core:Fragment fragmentName="my.static.Fragment" type="XML" /> </l:content> </l:VerticalLayout> </content> </Page> </mvc:View> The fragment my.Fragment is statically loaded. However, I now want to dynamically change the to-be-loaded fragment (ideally using data binding the fragmentName property, but any other means should be ok as well), ie. something like this:

Correct usage for filters when binding items via XMLView

非 Y 不嫁゛ 提交于 2019-12-30 06:23:28
问题 Using sap.m.Select , I have a similar code as this below: <m:Select selectedKey='{state}' items="{ path: 'states>/content', sorter: { path: 'name' } }"> <core:Item key="{states>id}" text="{states>name}" /> </m:Select> As want to be able to filter states by country when it is selected in another input, so, I'm trying using filters , which is defined in documentation in: https://sapui5.netweaver.ondemand.com/docs/api/symbols/sap.ui.base.ManagedObject.html#bindAggregation https://sapui5