on 05-12-2016 9:02 AM
Hello Guys,
I have create SAPUI5 App and add iconTabBar like
var iconbar = new sap.m.IconTabBar({
expanded : "{device>/isNoPhone}",
select : function(){
oController.selectedTab();
},
items : [
new sap.m.IconTabFilter({ // Icon
icon : "sap-icon://hint",
text : 'map',
key : i,
content : [ new sap.ui.core.HTML(
{
content : "<div id='map_canvas' style='width:800px; height: 320px;'></div>",
// preferDOM : true, // boolean
}
),
]
// Detail off pertiqular tab
})
],
})
And add HTML using sap.ui.core.HTML and but is my controller side i can't access or get my div id
selectedTab :function(){
alert('selectedTab');
var mapDiv = sap.ui.getCore().byId("map_canvas");
//var mapDiv = this.getView().byId("map_canvas");
alert(mapDiv);
alert(document.getElementById("map_canvas") );
},
but i get null. so please help me where i going wrong.
Hi,
Please try fetching the div by id with
var mapDiv = $('map_canvas');
Greetz
Silvio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.