sapui5

How to recover a error message from oData response [SAPUI5]

自古美人都是妖i 提交于 2019-12-24 07:42:16
问题 I had this issue and i searched a lot how to fix it, but i can't find any solution at the moment... well, the issue is the next error message, i can write the error but i need a specific entry of this batch. Error, Messagebox and Batch response. the code showed on the message box: { "message": "HTTP request failed", "headers": { "Content-Type": "application/xml;charset=utf-8", "Content-Length": "1333", "DataServiceVersion": "1.0" }, "statusCode": "400", "statusText": "Bad Request",

Input validation not working with OData model

痴心易碎 提交于 2019-12-24 06:33:46
问题 In the current project, I have a SimpleForm on a view. Binding a JSONModel on this view, the validateValue function is working fine on my input field. The constraints on the input field are defined as follows: <Input type="Text" maxLength="45" value="{ path: '/carrId', type: 'sap.ui.model.type.String', constraints: { minLength: 1, maxLength: 3 } }" /> Changing the model to an ODataModel doesn't fire the validateValue and the field is not marked with red if the constraints are not matched. The

How to concatenate multiple property bindings into one

牧云@^-^@ 提交于 2019-12-24 06:29:48
问题 I have an OData source that gives result rows that contain first_name & last_name . I want to display these in a table with a column called Full Name . I'm trying to use a JSView (It seems less kludgy than XML). I can do a 1:1 binding like this: var template = new sap.m.ColumnListItem({ // ..., cells: [ new sap.m.Text({ text: "{first_name}" }) ] }); But I cannot figure out how to bind / concatenate multiple fields to the Text control, or alternatively how to put multiple Text controls into

How to handle SAP Kapsel Offline app OData conflicts properly?

流过昼夜 提交于 2019-12-24 03:45:10
问题 I build an app that is able to store OData offline by using SAP Kapsel Plugins. More or less it's the same as generated by WEB ID or similer to the apps in this example: https://blogs.sap.com/2017/01/24/getting-started-with-kapsel-part-10-offline-odatasp13/ Now I am at the point to check the error resolution potential. I created a sync conflict (chaning data on the server after the offline database was stored and changed something on the app and started a flush). As mentioned in the

onCloseDialog event not working in my Controller. What's wrong with my code?

断了今生、忘了曾经 提交于 2019-12-24 00:35:28
问题 I'm trying to learn SAPUI5 and following the walkthrough in SAPUI5 documentation. I'm currently in Step 17: Fragment Callbacks. I am not able to make the onCloseDialog event work. The code I double and triple checked and I could not find anything wrong. There is also no error in Chrome's console. Any insights? Link to the guide I'm following: https://sapui5.hana.ondemand.com/#/topic/354f98ed2b514ba9960556333428d35e My code for: HelloDialog.fragment.xml <core:FragmentDefinition xmlns="sap.m"

Alternate Color for Highlighting Table Rows or Columns

假装没事ソ 提交于 2019-12-24 00:13:13
问题 The table alternative color as suggested in the dev guide doesn't work. #salesarea tbody tr:nth-child(even) { background: rgb(245, 245, 245); } Even though I use the ID of the sap.m.Table, the CSS doesn't work! Edited to add code: I'm using xml/desktop version and the view is in shell. view.xml <Table id="qcTable" inset="false" > <columns> <Column hAlign="Center" popinDisplay="Inline" width="10%" > <header> <Label text="Col 1"/> </header> </Column> <Column hAlign="Center" popinDisplay =

How to align checkboxes vertically in a non-editable form?

对着背影说爱祢 提交于 2019-12-23 23:23:07
问题 SAPUI5 simple form does not make the checkboxes vertically center align. Here is the code: <form:SimpleForm title="{i18n>wizardDateLocation}" minWidth="1024" editable="false" layout="ResponsiveGridLayout" > <Label text="{i18n>wholeDay}"/> <CheckBox selected="{/IsAllDay}" editable="false"/> <Label text="{i18n>date}" visible="{= ${/IsAllDay}}" required="true"/> <Text text="{/Start}" visible="{= ${/IsAllDay}}"/> <HBox></HBox> <Label text="{i18n>from}" visible="{= !${/IsAllDay} }" required="true"

SAPUI5 SAPUI5 XML model add item

一世执手 提交于 2019-12-23 05:08:30
问题 I have an XML model bound to a table and I want to add a new row to the model. The XML data itself is rather simple: <gettagevents> <tageventlist> <tagevent> <time>2011-09-09T14:29:16.302Z</time> <factory>06</factory> <materialcode>21</materialcode> <serial>16999991231</serial> </tagevent> <tagevent> <time>2011-09-09T14:29:17.101Z</time> <factory>06</factory> <materialcode>21</materialcode> <serial>16999991232</serial> </tagevent> </tageventlist> Only relevant is the value for serial, so it

Why scroll event not working in UI5 sap.m.Page?

匆匆过客 提交于 2019-12-23 04:41:16
问题 Demo I am trying to attach scroll event in my UI5 Page, but it is not fired: onInit: function() { $(window).scroll(function() { console.log("scrolled") }); }, onAfterRendering: function() { //Or var oPage = this.getView().byId("myPage"); oPage.attachBrowserEvent("window.onscroll", function(oEvent) { console.log("onscoll"); }); } 回答1: The event "window.onscroll" should be changed to the "scroll" event in your code. oPage.attachBrowserEvent("scroll", function(oEvent) { console.log("onscoll"); }

Why scroll event not working in UI5 sap.m.Page?

天涯浪子 提交于 2019-12-23 04:41:09
问题 Demo I am trying to attach scroll event in my UI5 Page, but it is not fired: onInit: function() { $(window).scroll(function() { console.log("scrolled") }); }, onAfterRendering: function() { //Or var oPage = this.getView().byId("myPage"); oPage.attachBrowserEvent("window.onscroll", function(oEvent) { console.log("onscoll"); }); } 回答1: The event "window.onscroll" should be changed to the "scroll" event in your code. oPage.attachBrowserEvent("scroll", function(oEvent) { console.log("onscoll"); }