Forked from gbvaibhav/gist:02b667afb34d9ae2d972dbce0929b70e
Created
September 7, 2017 17:01
-
-
Save harun/74c5a5df5346c90906a7b1f7d4a88d65 to your computer and use it in GitHub Desktop.
sapui5 icon Tab bar selection change at the click of a button https://jsbin.com/dobuqeb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html><head> | |
<meta name="description" content="UI5 List example with local JSON model" /> | |
<meta http-equiv='X-UA-Compatible' content='IE=edge' /> | |
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/> | |
<title>SAPUI5 Example gbvaibhav</title> | |
<!-- Load UI5, select gold reflection theme and the "commons" and "table" control libraries --> | |
<script src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js" | |
id="sap-ui-bootstrap" | |
data-sap-ui-libs="sap.m,sap.ui.layout" | |
data-sap-ui-xx-bindingSyntax="complex" | |
data-sap-ui-theme="sap_bluecrystal"></script> | |
<script> | |
var iconTab = new sap.m.IconTabBar({ | |
items:[ | |
new sap.m.IconTabFilter({ | |
text:"Tab 1", | |
key:"tab1", | |
content:[new sap.m.Button({ | |
text:"go to Tab 2", | |
press:function(){ | |
iconTab.setSelectedKey("tab2") | |
} | |
})] | |
}), | |
new sap.m.IconTabFilter({ | |
text:"Tab 2", | |
key:"tab2", | |
content:[new sap.m.Button({ | |
text:"go to Tab 1", | |
press:function(){ | |
iconTab.setSelectedKey("tab1") | |
} | |
})] | |
}) | |
] | |
}) | |
var page = new sap.m.Page({ | |
title:"SAPUI5 List Example", | |
content:[ | |
iconTab | |
] | |
}); | |
// finally place the App into the UI | |
var app = new sap.m.App({ | |
pages: [page] | |
}).placeAt("content"); | |
</script> | |
</head> | |
<body> | |
<div id='content'></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment