<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: UI5 function import with xmView in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/ui5-function-import-with-xmview/qaa-p/12187171#M4558655</link>
    <description>&lt;P&gt;have you ever seen any binding in xml view that have reaction part?&lt;/P&gt;</description>
    <pubDate>Tue, 19 May 2020 15:02:32 GMT</pubDate>
    <dc:creator>junwu</dc:creator>
    <dc:date>2020-05-19T15:02:32Z</dc:date>
    <item>
      <title>UI5 function import with xmView</title>
      <link>https://community.sap.com/t5/technology-q-a/ui5-function-import-with-xmview/qaq-p/12187170</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;I am calling a function import to start a workflow in the backend. Currently I have implemented the logic in the controller.js as I need to perform different actions depending on the response. It is working fine, but is there a more elegant was to implement this function import call via the xml view?&lt;/P&gt;
  &lt;P&gt;I found a start here: &lt;A href="https://blogs.sap.com/2016/02/26/binding-data-from-odata-function-import-in-sapui5-xml-views/" target="_blank"&gt;Binding data from Odata function Import in SAPUI5 XML&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;but it does not cover the reaction to the response.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;*********************** view.xml
&amp;lt;Button text="Start workflow" press="onStartWorkflow"/&amp;gt;

*********************** controller.js

onStartWorkflow : function () {
	var oModel = this.getView().getModel();
	oModel.callFunction(
		"/startWorkflow", {
			method: "GET",
			urlParameters: {
				task: "TSXXXXXX"
			},
			success: function (oData, response) {
				if (response.data.state === "Started") {
					MessageToast.show("Workflow" + response.wfID + "started");
				} else {
			MessageToast.show("workflow could not be started");
				}
			},
			error: function (oError) {
				MessageToast.show("oData call Error");
			}
		});
},


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 May 2020 07:22:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/ui5-function-import-with-xmview/qaq-p/12187170</guid>
      <dc:creator>Koen_VL</dc:creator>
      <dc:date>2020-05-19T07:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: UI5 function import with xmView</title>
      <link>https://community.sap.com/t5/technology-q-a/ui5-function-import-with-xmview/qaa-p/12187171#M4558655</link>
      <description>&lt;P&gt;have you ever seen any binding in xml view that have reaction part?&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 15:02:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/ui5-function-import-with-xmview/qaa-p/12187171#M4558655</guid>
      <dc:creator>junwu</dc:creator>
      <dc:date>2020-05-19T15:02:32Z</dc:date>
    </item>
  </channel>
</rss>

