sapui5

sap.m.Panel: make entire header clickable

断了今生、忘了曾经 提交于 2020-08-11 09:08:10
问题 I have sap.m.Panel and I want to enable expand / collapse where the user click on the header. But this event only fires when the user clicks on the arrow. Any idea of how to solve it? This is my code: var panel = new Panel(); // Panel required from "sap/m/Panel" panel.setExpandable(true); panel.setHeaderText("someText"); 回答1: We had the similar requirement and we made it to work with following logic: 1. Add a headerToolbar to Panel. 2. Attach click event on the headerToolbar. 3.

How to access TextArea's text and/or change it?

筅森魡賤 提交于 2020-08-11 02:29:26
问题 XML View <TextArea id="message" maxLength="100" width="100%" valueLiveUpdate="true" showExceededText="false" placeholder="Type here.." required="true" /> Controller onInit: function() { // ... this.getView().byId("message").setText(""); }, Here I tried two commands to clear the text area values. But got error this.getView().byId("message").setText(""); TypeError: this.getView(...).byId(...).setText is not a function sap.ui.getCore().byId("message").setText(""); TypeError: sap.ui.getCore(...)

How can I use typeInstance instead of type in p13n dialog?

£可爱£侵袭症+ 提交于 2020-08-10 20:07:35
问题 I already asked a question here regarding ignoring of type of a custom column by smart table in new version of SAPUI5. In the work around I discovered in the API that I can use a new property called typeInstance instead of type : Now the question is how can I pass a typeInstance object instead of type in smart table xml definition: <Column visible="true"> <customData> <core:CustomData key="p13nData" value='{ "columnKey": "Datum", "leadingProperty": "Datum", "sortProperty": "Datum",

How to send/post files as form data (an AJAX post) to backend service using upload collection

二次信任 提交于 2020-08-10 19:12:09
问题 I was using upload collection for uploading files/attachments as : XML : <UploadCollection id="UploadCollection" maximumFilenameLength="55" maximumFileSize="10" multiple="true" change="onChange" fileType="jpg,pdf,docx,xlsx,pptx,tif,png" fileSizeExceed="onFileSizeExceed" filenameLengthExceed="onFilenameLengthExceed" fileDeleted="onFileDeleted" selectionChange="onSelectionChange" typeMissmatch="onTypeMissmatch" uploadComplete="onUploadComplete" fileRenamed="onFileRenamed" noDataText = "No Files