shows the specified view, creates a new one if it doesn't exist
name | string | view name |
boolean | true if view was accessed first time, false otherwise |
// here is an example how to initialize content
// in several views on demand inside of a tab
// 1) for the default view "def" we will simply attach an URL
// 2) for the "grid" view we will attach menu and grid
// 3) and for the "tree" view we will attach toolbar and tree
var myMenu;
var myGrid;
var myToolbar;
var myTree;
// the default view is ready right after component initialization
myTabbar.tabs(id).attachURL("http://somedomain.com/page.html");
function initView(name) {
// assuming that this function will be called after some user action
// like a button click or some other
var state = myTabbar.tabs(id).showView(name);
if (state == true) {
// first call, initializes corresponding components
if (name == "grid") {
myMenu = myTabbar.tabs(id).attachMenu();
myGrid = myTabbar.tabs(id).attachGrid();
} else if (name == "tree") {
myToolbar = myTabbar.tabs(id).attachToolbar();
myTree = myTabbar.tabs(id).attachTree();
}
}
}
The default view name is "def", it is created automatically when a cell is created