@Override
public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
if (!component.isRendered()) return;
super.encodeBegin(context, component);
ResponseWriter writer = context.getResponseWriter();
BorderLayoutPanel borderLayoutPanel = (BorderLayoutPanel) component;
String clientId = borderLayoutPanel.getClientId(context);
writer.startElement("div", borderLayoutPanel);
writer.writeAttribute("id", clientId, null);
writeAttribute(writer, "style", borderLayoutPanel.getStyle());
String classStr = Styles.getCSSClass(context,
borderLayoutPanel, borderLayoutPanel.getStyle(),
"o_borderlayoutpanel_container", borderLayoutPanel.getStyleClass()
);
writer.writeAttribute("class", classStr, null);
Rendering.writeStandardEvents(writer, borderLayoutPanel);
encodeScriptsAndStyles(context, borderLayoutPanel);
encodeSidePanels(context, borderLayoutPanel);
writer.startElement("div", borderLayoutPanel);
writer.writeAttribute("id", clientId + "::content", null);
String contentClassStr = Styles.getCSSClass(context,
borderLayoutPanel, borderLayoutPanel.getContentStyle(),
"o_borderlayoutpanel_content", borderLayoutPanel.getContentClass()
);
writer.writeAttribute("class", contentClassStr, null);
encodeScriptsAndStyles_content(context, borderLayoutPanel, clientId);
}