on 06-22-2015 11:34 AM
Hi all,
i am developing an sapui5 application using kapsel master while i am creating multiple views it is generating dynamic id's like __xmlview1,__xmlview2
like this while i am accesing components in views i need to call like this __xmlview4--frgament--componentid ,
but problem is __ xmlview4 is not static, it is generated dynamically so some times i am unable to access the components how can i rectify this problem or how to give static id's for views.
Thanks,
Kotesh.
Hi,
You can give id's from component.js.
please check below to give unique id's
If you want to give unique id to views from Component.js , you can try
var oView = sap.ui.view({
id : "idApp",
viewName : "test.view.App",
type : "JS",
viewData : { component : this }
});
Regards,
Koti Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Koti Reddy,
i am using following code in my controller of instantiating view
onInit: function() {
this.getRouter().attachRouteMatched(this.onRouteMatched, this);
},
so it gives an error like
Uncaught TypeError: Cannot read property 'attachRouteMatched' of undefined
i am getting this as present view but it gives error for above statement i mean this.getRouter() gives undefined only in this scenario otherwise it is working fine and gives an dynamic id.
Thanks,
Kotesh.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.