javascript - Access one controller inside another in SAPUI5 -
i have sapui5 master detail page application. in master page controller need access element defined in detail view. how can it?
jquery.sap.require("util.formatter"); jquery.sap.require("util.networkaccess"); sap.ui.controller("view.sales.salesorder.somaster", { myfunc: function() { var icontabbar = this.byid('itabbar'); icontabbar.setselecteditem(icontabbar.getitems()[1]); } })
the above code through error because itabbar
element not there in master view, it's defined in detail view file.
i not sure know trying do, controls have unique id's prefixed view, try
var icontabbar = sap.ui.getcore().byid("vwdetails--itabbar")
Comments
Post a Comment