sapui5

How to refresh all (OData) bindings of a given SAPUI5 page?

不羁的心 提交于 2019-12-25 04:17:16
问题 I have a bigger SAPUI5 application with multiple pages. If user navigates through all these pages, they will reside in memory of course. Now I have the problem that some of these pages have a complex context with several bindings to an ODataModel. That leads to the problem that a .refresh() call on the underlying ODataModel take some time. Because: all known bindings will be reloaded (also from pages not currently shown) Now I am searching for a better solution to refresh the ODataModel. The

I want to pass the values to label consuming odata

断了今生、忘了曾经 提交于 2019-12-25 03:53:22
问题 since the variables declared(idno, namecity) are inside parentheses I could not access them out side. Is this the way to get values or which would be the best way. Thank You <script> var app = sap.m.App("myApp",{}); var url = "proxy/http/server/ZCUST_TESTING_SRV /?$filter=IKunnr eq '800COL101'"; var username = "mobtest"; var password = "welcome1"; var oModel = new sap.ui.model.odata.ODataModel(url, true, username, password); oModel.read('/', null, null, true, function(oData, oResponse) { var

How can I remove a master or detail page from SplitApp?

左心房为你撑大大i 提交于 2019-12-25 03:24:53
问题 I add a master page by: splitApp.addMasterPage(sap.ui.xmlview( "clientiListMaster", "apps.appClienti.master.clientiListMaster" )); Ok. my app work perfectly! Now I want remove it from split app.. i try to do it by: splitApp.removeMasterPage("clientiListMaster"); but after that, if I try to add once again the same page by: splitApp.addMasterPage(sap.ui.xmlview( "clientiListMaster", "apps.appClienti.master.clientiListMaster" )); I have this error: 2014-09-05 17:12:01 adding element with

Map json to menu in Openui5

你。 提交于 2019-12-25 02:55:36
问题 In w2ui I can map a json to a sidebar http://w2ui.com/web/demos/#!sidebar/sidebar-1 Can I do it in openui5? I want the same result. Obviously I do not want a tree but a list of items that swipe right if I tap on an item (and visualize a sub-menu list) and slide left if I press back button (and visualize the menu at upper level). 回答1: I think it's possible, but as far as I know you have to do some manual labor: Detect whether your node has one or more child nodes, and based on that set the sap

Date format in a table SAPUI5

感情迁移 提交于 2019-12-25 02:14:15
问题 I have created a table using SAPUI5 and I get the data to the table using ODATA service. BUt, I have a column which is of a type DATE and the format is something like this "Thu Jan 13 2011 01:00:00 GMT+0100 (Mitteleuropäische Zeit)" . I tried to google and I found this blog which is really nice. But here I see also a jsbin example where only a single data value has been used. But I need to select one whole column " Businessdate " and format it to something like this ´13.01.2014´. Any

Title depending on other variable in SAPUI5

混江龙づ霸主 提交于 2019-12-25 00:04:39
问题 Sometimes when I want to show something and hide other thing I just do: visible={some_variable} for example <Column visible={some_variable}> . Now I have to deal with Dialog title I mean: I would like to do something depending on other variable - if variable is a then title="{i18n>a}" and if variable is b then title="{i18n>b}" . How can I do that? 回答1: The ternary operator works in sapui5 bindings. So in this case, you could do: <Dialog title="{= ${variable} === 'A' ? ${i18n>a} : ${i18n>b} }"

SapUI5 RichTextEditor Image Upload Issue

亡梦爱人 提交于 2019-12-24 22:04:04
问题 I'm using RichTextEditor in my project to be able to add comment. I can edit comments by click. There is an image in some comments (Base64 image). When I clicked on a comment which has an image I can't see the image in rich text editor. But I can see the image data in my message data. Why I can't set the image to the rich text editor. Where I am doing mistake ? Please let me know about this issue. Here is my code and screenshot; Screenshot image link: image openAddCommentDialog: function

Error While Creating a Dialog Box Using XML Fragments

别等时光非礼了梦想. 提交于 2019-12-24 20:31:54
问题 I am getting the below error while trying to display a dialog box after user presses a button, sap-ui-core.js:80 Uncaught Error: failed to load 'sap/m/buttons.js' from resources/sap/m/buttons.js: 404 - Resource could not be found! Please find the XML code below. <Dialog xmlns="sap.m" icon="sap.icon://filter" title="Filter product details"> <content> <List id="ls2" items="{/value}" mode="MultiSelect"> <StandardListItem title="{CompanyName}"/> </List> </content> <buttons> <Button text="ok" icon

Consuming OData from Eclipse

笑着哭i 提交于 2019-12-24 19:47:19
问题 I've been practicing SAPUI5 with the documentation but they use SAP Web IDE to consume OData services. However, because my company won't expose their server to the cloud, I can't use SAP Web IDE so I need to use eclipse. I need a tutorial step by step (for dummies) for consuming OData with SAPUI5 from eclipse. I already know how to create them but not how to use them from eclipse. I use the OData service from Northwind but with SAP, I'll need credentials and other things. "dataSources": {

Bootstraping OpenUI5 from single JS file

老子叫甜甜 提交于 2019-12-24 16:58:10
问题 OpenUI5 documentation suggests starting work by using a library loaded from CDN: <script id="sap-ui-bootstrap" type="text/javascript" src="https://openui5.hana.ondemand.com/1.42.6/resources/sap-ui-core.js" data-sap-ui-theme="sap_belize" data-sap-ui-libs="sap.m,sap.ui.table"></script> Unfortunately, this approach means load cascading 4 scripts on startup: sap-ui-core.js sap/ui/core/library.js (why ?) sap/m/library.js sap/ui/table/library.js Is there way to bundle this four libraries into one