attributes.clear();
attributes.addCDATAAttribute("name", String.valueOf(tab.getName()));
if (j == selected) {
attributes.addCDATAAttribute("selected", "true");
} else {
LayoutAspectDataEvent event = new LayoutAspectDataEvent(tabLayout, "tab", new Integer(j));
attributes.addCDATAAttribute("parameter", portalService.getLinkService().getLinkURI(event));
}
XMLUtils.startElement(handler, "named-item", attributes);
if (j == selected) {
this.processLayout(tab.getLayout(), service, handler);