labelsTrElem.setAttribute("style", "height: 1px");
setElementLocked(protocol, labelsTrElem);
// get main RegionInstance
ContainerInstance containingInstance = context.getPageContext()
.getCurrentContainerInstance();
containingInstance.getCurrentBuffer().transferContentsFrom(
getLabelsRegionInstance().getCurrentBuffer());
renderTabStripFiller(mainBuffer);
// Increase colspan for tab strip filler
context.addColspan(1);
// Close labels tr
mainBuffer.closeElement("tr");
// Create tr element for contents in main buffer
Element contentsTrElem = mainBuffer.openStyledElement("tr", contentsTrStyle);
contentsTrElem.setAttribute("id", protocol.getMarinerPageContext()
.generateUniqueFCID());
setElementLocked(protocol, contentsTrElem);
// Create td element with proper style
Styles contentsTdStyle = StylingFactory.getDefaultInstance()
.createInheritedStyles(
protocol.getMarinerPageContext().getStylingEngine()
.getStyles(), DisplayKeywords.TABLE_CELL);
Element contentsTdElem = mainBuffer.openStyledElement("td",
contentsTdStyle);
String contentId = protocol.getMarinerPageContext()
.generateUniqueFCID();
context.setContentId(contentId);
contentsTdElem.setAttribute("id", contentId);
contentsTdElem.setAttribute("colspan", "" + context.getColspan());
setElementLocked(protocol, contentsTdElem);
contentsTdElem.getStyles().getPropertyValues()
.setComputedAndSpecifiedValue(
StylePropertyDetails.VERTICAL_ALIGN,
VerticalAlignKeywords.TOP);
// Insert tab contents buffer to main buffer
// mainBuffer.addOutputBuffer(tabsBuffer);
// pop tab's contents deviceLayoutContext
DeviceLayoutContext contentsLayoutToPop = context.getPageContext()
.getDeviceLayoutContext();
RegionContent contentsRegionContent = new DeviceLayoutRegionContent(
contentsLayoutToPop);
context.getPageContext().popDeviceLayoutContext();
// add contentsRegionContent to main RegionInstance
containingInstance.getCurrentBuffer().transferContentsFrom(
getContentsRegionInstance().getCurrentBuffer());
// Close contents tr element
mainBuffer.closeElement("td");
mainBuffer.closeElement("tr");