Integer data = (Integer) layout.getAspectData(config.aspectName);
int selected = data.intValue();
// loop over all tabs
for (int j = 0; j < tabLayout.getSize(); j++) {
NamedItem tab = (NamedItem) tabLayout.getItem(j);
// open named-item tag
attributes.clear();
attributes.addCDATAAttribute("name", String.valueOf(tab.getName()));
if (j == selected) {
attributes.addCDATAAttribute("selected", "true");
} else {
ChangeAspectDataEvent event = new ChangeAspectDataEvent(tabLayout, "tab", new Integer(j));
attributes.addCDATAAttribute("parameter", portalService.getComponentManager().getLinkService().getLinkURI(event));
}
XMLUtils.startElement(handler, "named-item", attributes);
if (j == selected) {
this.processLayout(tab.getLayout(), service, handler);
}
// close named-item tag
XMLUtils.endElement(handler, "named-item");
}
} catch (ComponentException ce) {