/**
* {@inheritDoc}
*/
protected void handleChildren(AbstractClient rootHandler, IContainer c, DomNode element)
{
TabContainer tabCon = (TabContainer) c;
tabCon.clearTabs();
List tabsList = getChildrenByTag(element, "tabs");
if (tabsList.size() > 0)
{
DomNode tabsNode = (DomNode) tabsList.get(0);
List tabs = getChildrenByTag(tabsNode, "tab");
for (int i = 0; i < tabs.size(); i++)
{
DomNode tabNode = (DomNode) tabs.get(i);
String label = tabNode.getAttribute("label");
String selected = tabNode.getAttribute("selected");
tabCon.addTab(label);
if ("true".equalsIgnoreCase(selected))
{
tabCon.setActiveTab(i);
}
}
}
List tabContent = getChildrenByTag(element, "tabContent");
for (int i = 0; i < tabContent.size(); i++)
{
DomNode contentNode = (DomNode) tabContent.get(i);
List colList = getChildrenByTag(contentNode, "element");
if (colList.size() > 0)
{
DomNode elementNode = (DomNode) colList.get(0);
Widget content = (Widget) getClient().handle(this, elementNode);
tabCon.setContent(content);
}
}
}