on 04-04-2016 8:09 AM
Hi I have a IconTabBar defined with many steps in a view , lets say App.view.xml
Each step of the TabBar displays some content defined in their own respective view
How do I get access to the IcontabBar from another view lets say S1. Clicking on a tile in S1 view should take to the Step 2 of the IconTab Bar
On click of the tile, it should navigate to Step 2.
Thanks
Sandip
is the information you are trying to access bindable? if yes, you can put them in model,which can be access across the views.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use "this.getView().byId()", which allows you to use the id you specified on the XML or HTML.
Regards,
Pradeep.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In order to explain better this is the code.
var oList = this.getView().byId("list");
var items = oList.getItems();
var oList = sap.ui.getCore().byId("list");
if you look into the View's byId-method, you can see that it prepends the views Id, it essentially calls sap.ui.getCore().byId(this.createId(id)).
This is so that you can instantiate a view several times without having duplicate IDs. In order to access the Controls from the outside, you either need the View so you can call view.byId(id), or you have to manually concatenate the view's id with the id like this: sap.ui.getCore().byId(viewId + "--" + id).
Follow this link for refrence.
sapui5 - sap.ui.getCore().byId() returns no element - Stack Overflow
Regards,
Pradeep
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.