public class ToolbarRenderer extends org.primefaces.component.toolbar.ToolbarRenderer {
@Override
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
Toolbar toolbar = (Toolbar) component;
ResponseWriter writer = context.getResponseWriter();
String style = toolbar.getStyle();
String styleClass = toolbar.getStyleClass();
styleClass = styleClass == null ? Toolbar.MOBILE_CONTAINER_CLASS : Toolbar.MOBILE_CONTAINER_CLASS + " " + styleClass;
writer.startElement("div", toolbar);
writer.writeAttribute("id", toolbar.getClientId(context), null);
writer.writeAttribute("class", styleClass, null);
if(style != null) {
writer.writeAttribute("style", style, null);
}
encodeGroup(context, toolbar.getFacet("left"), Toolbar.MOBILE_LEFT_GROUP_CLASS);
writer.startElement("span", null);
writer.writeAttribute("class", "ui-title", null);
writer.endElement("span");
encodeGroup(context, toolbar.getFacet("right"), Toolbar.MOBILE_RIGHT_GROUP_CLASS);
writer.endElement("div");
}