Examples of ColumnGroup


Examples of org.primefaces.component.columngroup.ColumnGroup

   }
   
   private ColumnGroup getColumnGroup(DataTable table, String target) {
        for(UIComponent child : table.getChildren()) {
            if(child instanceof ColumnGroup) {
                ColumnGroup colGroup = (ColumnGroup) child;
                String type = colGroup.getType();

                if(type != null && type.equals(target)) {
                    return colGroup;
                }
View Full Code Here

Examples of org.primefaces.component.columngroup.ColumnGroup

    }

    protected void encodeTFoot(FacesContext context, DataTable table, int columnStart, int columnEnd) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        List<UIColumn> columns = table.getColumns();
        ColumnGroup group = table.getColumnGroup("footer");

        writer.startElement("tfoot", null);
        writer.writeAttribute("id", table.getClientId(context) + "_foot", null);

        if(group != null && group.isRendered()) {
            context.getAttributes().put(Constants.HELPER_RENDERER, "columnGroup");

            for(UIComponent child : group.getChildren()) {
                if(child.isRendered()) {
                    if(child instanceof Row) {
                        Row footerRow = (Row) child;

                        writer.startElement("tr", null);
View Full Code Here

Examples of org.primefaces.component.columngroup.ColumnGroup

import org.primefaces.component.datatable.DataTableRenderer;

public class ColumnGroupHelperRenderer implements HelperColumnRenderer {

    public void encode(FacesContext context, Column column) throws IOException {
        ColumnGroup group = findGroup(column);
        DataTable table = (DataTable) group.getParent();
        String type = group.getType();
        DataTableRenderer renderer = (DataTableRenderer) context.getRenderKit().getRenderer("org.primefaces.component", "org.primefaces.component.DataTableRenderer");
       
        if(type.equals("header"))
            renderer.encodeColumnHeader(context, table, column);
        else if(type.equals("footer"))
View Full Code Here

Examples of org.primefaces.component.columngroup.ColumnGroup

        encodeFacet(context, tt, tt.getFacet("footer"), TreeTable.FOOTER_CLASS);
    }

  protected void encodeThead(FacesContext context, TreeTable tt) throws IOException {
    ResponseWriter writer = context.getResponseWriter();
        ColumnGroup group = tt.getColumnGroup("header");
        String clientId = tt.getClientId(context);

    writer.startElement("thead", null);
        writer.writeAttribute("id", clientId + "_head", null);
              
        if(group != null && group.isRendered()) {
            for(UIComponent child : group.getChildren()) {
                if(child.isRendered() && child instanceof Row) {
                    Row headerRow = (Row) child;

                    writer.startElement("tr", null);
View Full Code Here

Examples of org.primefaces.component.columngroup.ColumnGroup

        writer.endElement("div");
    }
   
    protected void encodeTfoot(FacesContext context, TreeTable tt) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        ColumnGroup group = tt.getColumnGroup("footer");
       
        writer.startElement("tfoot", null);

        if(group != null && group.isRendered()) {
            for(UIComponent child : group.getChildren()) {
                if(child.isRendered() && child instanceof Row) {
                    Row footerRow = (Row) child;

                    writer.startElement("tr", null);
View Full Code Here

Examples of org.primefaces.component.columngroup.ColumnGroup

    }
   
    @Override
    protected void encodeThead(FacesContext context, DataTable table, int columnStart, int columnEnd, String theadId) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        ColumnGroup group = table.getColumnGroup("header");
        List<UIColumn> columns = table.getColumns();
        String theadClientId = (theadId == null) ? table.getClientId(context) + "_head" : theadId;
       
        writer.startElement("thead", null);
        writer.writeAttribute("id", theadClientId, null);
       
        if(group != null && group.isRendered()) {
            context.getAttributes().put(Constants.HELPER_RENDERER, "columnGroup");

            for(UIComponent child : group.getChildren()) {
                if(child.isRendered()) {
                    if(child instanceof Row) {
                        Row headerRow = (Row) child;

                        writer.startElement("tr", null);
View Full Code Here

Examples of org.primefaces.component.columngroup.ColumnGroup

      writer.endElement("td");
      writer.endElement("tr");
    }

    ColumnGroup group = table.getColumnGroup("header");
    if (group != null && group.isRendered()) {
      for (UIComponent child : group.getChildren()) {
        if (child.isRendered() && child instanceof Row) {
          Row headerRow = (Row) child;

          writer.startElement("tr", null);
          writer.writeAttribute("class", "ui-widget-header", null);
View Full Code Here

Examples of org.primefaces.component.columngroup.ColumnGroup

      writer.endElement("td");
      writer.endElement("tr");
    }

    ColumnGroup group = table.getColumnGroup("footer");

    if (group == null || !group.isRendered())
      return;

    for (UIComponent child : group.getChildren()) {
      if (child.isRendered() && child instanceof Row) {
        Row footerRow = (Row) child;

        writer.startElement("tr", null);
        writer.writeAttribute("class", "ui-widget-header", null);
View Full Code Here

Examples of org.primefaces.component.columngroup.ColumnGroup

    public Map<String,Column> getFilterMap() {
      if(filterMap == null) {
         filterMap = new HashMap<String,Column>();

         ColumnGroup group = getColumnGroup("header");
         if(group != null) {
            //column group
            for(UIComponent child : group.getChildren()) {
               Row headerRow = (Row) child;
              
               if(headerRow.isRendered()) {
                   for(UIComponent headerRowChild : headerRow.getChildren()) {
                      Column column= (Column) headerRowChild;
View Full Code Here

Examples of org.primefaces.component.columngroup.ColumnGroup

    }

    public ColumnGroup getColumnGroup(String target) {
        for(UIComponent child : this.getChildren()) {
            if(child instanceof ColumnGroup) {
                ColumnGroup colGroup = (ColumnGroup) child;
                String type = colGroup.getType();

                if(type != null && type.equals(target)) {
                    return colGroup;
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.