Package org.primefaces.component.toolbar

Examples of org.primefaces.component.toolbar.Toolbar


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");
    }
View Full Code Here

TOP

Related Classes of org.primefaces.component.toolbar.Toolbar

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.