I have a XML view that is using IconTabBar to display one of these "IconTab" On the user who chose I would like to trigger a method in the controller JS file.
One of the IconTab definitions is the following code:
& lt; IconTabFilterText = "DATA" Icon = "SAP-Icon: // DOCUMENT" Press = "ONDATA" & gt; & Lt; Content Press = "Personal Data" id = "Data" & gt; & Lt; Cmn: tree nodes = "{/ aRoot}" & gt; & Lt; Cmn: treenode text = "{@ name} tagnamename here?" & Gt; & Lt; / Cmn: triode & gt; & Lt; / CMN: tree & gt; & Lt; / Content & gt; & Lt; / IconTabFilter & gt;
I was assuming that press = "OnData" will allow me to trigger a method on the controller file. It is not.
Does anyone know that this can be done and if so how?
thanks
Martin
you switch logic By using select (oControlEvent)
parent's iconTabBar
you can use the key
value IconTabFilter
and & Lt; / IconTabFilter & gt; & Lt; IconTabFilter key = "2" text = "test2" & gt; & Lt; Text text = "test2" /> & Lt; / IconTabFilter & gt; & Lt; / Item & gt; & Lt; / IconTabBar & gt; & Lt; / L: VerticalLayout & gt; & Lt; / MVC: View & gt; & Lt; / Script & gt; & Lt; Script & gt; Sap.ui.controller ("test.controller", {onSelectChanged: function (oEvent) {var key = oEvent.getParameters () key; if (key == '1') {warning ("click on test 1") ;} Else if (key == '2') {Warning ("Click on Test 2"}}}}}); Var oView = sap.ui.xmlview ({visualization: jQuery ("#view1") .html ()}); OView.placeAt ("content"); & Lt; / Script & gt; & Lt; Boy class = "sapUiBody" id = "content" />
Comments
Post a Comment