@Override
protected void encodeMarkup(FacesContext context, TabView tabView) throws IOException {
ResponseWriter writer = context.getResponseWriter();
String clientId = tabView.getClientId(context);
String widgetVar = tabView.resolveWidgetVar();
String style = tabView.getStyle();
String styleClass = tabView.getStyleClass();
styleClass = (styleClass == null) ? TabView.MOBILE_CONTAINER_CLASS : TabView.MOBILE_CONTAINER_CLASS + " " + styleClass;
writer.startElement("div", tabView);
writer.writeAttribute("id", clientId, null);
writer.writeAttribute("class", styleClass, "styleClass");
writer.writeAttribute(HTML.WIDGET_VAR, widgetVar, null);
if (style != null) {
writer.writeAttribute("style", tabView.getStyle(), "style");
}
encodeHeaders(context, tabView);
encodeContents(context, tabView);
encodeStateHolder(context, tabView, clientId + "_activeIndex", String.valueOf(tabView.getActiveIndex()));
renderDynamicPassThruAttributes(context, tabView);
writer.endElement("div");
}