Package org.primefaces.component.columngroup

Examples of org.primefaces.component.columngroup.ColumnGroup


        List<FilterMeta> filterMetadata = new ArrayList<FilterMeta>();
        String separator = String.valueOf(UINamingContainer.getSeparatorChar(context));
        String var = table.getVar();
        Map<String,String> params = context.getExternalContext().getRequestParameterMap();
       
        ColumnGroup group = getColumnGroup(table, "header");
        if(group != null) {
            for(UIComponent child : group.getChildren()) {
                Row headerRow = (Row) child;

                if(headerRow.isRendered()) {
                    for(UIComponent headerRowChild : headerRow.getChildren()) {
                        if(headerRowChild instanceof Column) {
View Full Code Here


        this.encodeThead(context, table, 0, table.getColumns().size(), null);
    }

    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;
        char separator = UINamingContainer.getSeparatorChar(context);
       
        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

   }
   
   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

    }

    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

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

        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

        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

    }
   
    @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

      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

      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

TOP

Related Classes of org.primefaces.component.columngroup.ColumnGroup

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.