@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } clearMetaInfo(context, component); ((UIData) component).setRowIndex(-1); // Render the ending of this table renderTableEnd(context, component, context.getResponseWriter()); }
protected void renderColumnGroups(FacesContext context, UIComponent table) throws IOException { UIComponent colGroups = getFacet(table, "colgroups"); if (colGroups != null) { encodeRecursive(context, colGroups); } }
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } UIData data = (UIData) component; data.setRowIndex(-1); // Render the beginning of the table ResponseWriter writer = context.getResponseWriter(); renderTableStart(context, component, writer, ATTRIBUTES); // Render the caption if present renderCaption(context, data, writer); // Render the header facets (if any) renderHeader(context, component, writer); // Render the footer facets (if any) renderFooter(context, component, writer); }
rendererParamsNotNull(context, component); if (!shouldEncodeChildren(component)) { return; TableMetaInfo info = getMetaInfo(context, data); if(info.columns.isEmpty()) { renderEmptyTableBody(writer,data); return; int rowIndex = data.getFirst() - 1; int rows = data.getRows(); List<Integer> bodyRows = getBodyRows(context.getExternalContext().getApplicationMap(), data); boolean hasBodyRows = (bodyRows != null && !bodyRows.isEmpty()); boolean wroteTableBody = false; if (!hasBodyRows) { renderTableBodyStart(context, component, writer); renderRowStart(context, component, writer); renderRow(context, component, null, writer); renderRowEnd(context, component, writer); renderedRow = true; this.renderEmptyTableRow(writer, data); renderTableBodyEnd(context, component, writer);
throws IOException { TableMetaInfo info = getMetaInfo(context, table); UIComponent footer = getFacet(table, "footer"); String footerClass = (String) table.getAttributes().get("footerClass"); if ((footer != null) || info.hasFooterFacets) { writer.writeAttribute("class", footerClass, "footerClass"); UIComponent facet = getFacet(column, "footer"); if (facet != null) { encodeRecursive(context, facet); renderRowEnd(context, table, writer); encodeRecursive(context, footer); writer.endElement("td"); renderRowEnd(context, table, writer);
throws IOException { rendererParamsNotNull(context, component); if (!shouldEncodeChildren(component)) { return; int rows = data.getRows(); renderTableBodyStart(context, component, writer); while (true) { renderRowStart(context, component, writer); renderRow(context, component, null, writer); renderRowEnd(context, component, writer); renderTableBodyEnd(context, component, writer);
protected void renderRow(FacesContext context, UIComponent table, UIComponent child, ResponseWriter writer) throws IOException { // Iterate over the child UIColumn components for each row TableMetaInfo info = getMetaInfo(context, table); info.newRow(); for (UIColumn column : info.columns) { // Render the beginning of this cell writer.startElement("td", column); String columnClass = info.getCurrentColumnClass(); if (columnClass != null) { writer.writeAttribute("class", columnClass, "columnClasses"); } // Render the contents of this cell by iterating over // the kids of our kids for (Iterator<UIComponent> gkids = getChildren(column); gkids.hasNext();) { encodeRecursive(context, gkids.next()); } // Render the ending of this cell writer.endElement("td"); writer.writeText("\n", table, null); } }
rendererParamsNotNull(context, component); if (!shouldEncodeChildren(component)) { return; TableMetaInfo info = getMetaInfo(context, data); if(info.columns.isEmpty()) { renderEmptyTableBody(writer,data); return; int rowIndex = data.getFirst() - 1; int rows = data.getRows(); List<Integer> bodyRows = getBodyRows(context.getExternalContext().getApplicationMap(), data); boolean hasBodyRows = (bodyRows != null && !bodyRows.isEmpty()); boolean wroteTableBody = false; if (!hasBodyRows) { renderTableBodyStart(context, component, writer); renderRowStart(context, component, writer); renderRow(context, component, null, writer); renderRowEnd(context, component, writer); renderedRow = true; this.renderEmptyTableRow(writer, data); renderTableBodyEnd(context, component, writer);
throws IOException { TableMetaInfo info = getMetaInfo(context, table); UIComponent footer = getFacet(table, "footer"); writer.writeAttribute("class", footerClass, "footerClass"); UIComponent facet = getFacet(column, "footer"); if (facet != null) { writer.writeText("", table, null); encodeRecursive(context, facet); renderRowEnd(context, table, writer); writer.writeAttribute("colspan", String.valueOf(info.columns.size()), null); encodeRecursive(context, footer); writer.endElement("td"); renderRowEnd(context, table, writer);
TableMetaInfo info = getMetaInfo(context, table); info.newRow(); for (UIColumn column : info.columns) { for (Iterator<UIComponent> gkids = getChildren(column); gkids.hasNext();) { encodeRecursive(context, gkids.next());
rendererParamsNotNull(context, component); if (!shouldEncodeChildren(component)) { return; TableMetaInfo info = getMetaInfo(context, data); if(info.columns.isEmpty()) { renderEmptyTableBody(writer,data); return; int rowIndex = data.getFirst() - 1; int rows = data.getRows(); List<Integer> bodyRows = getBodyRows(context.getExternalContext().getApplicationMap(), data); boolean hasBodyRows = (bodyRows != null && !bodyRows.isEmpty()); boolean wroteTableBody = false; if (!hasBodyRows) { renderTableBodyStart(context, component, writer); renderRowStart(context, component, writer); renderRow(context, component, null, writer); renderRowEnd(context, component, writer); renderedRow = true; this.renderEmptyTableRow(writer, data); renderTableBodyEnd(context, component, writer);
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } UIData data = (UIData) component; data.setRowIndex(-1); // Render the beginning of the table ResponseWriter writer = context.getResponseWriter(); renderTableStart(context, component, writer, ATTRIBUTES); // Render the caption (if any) renderCaption(context, data, writer); // Render column groups (if any) renderColumnGroups(context, data); // Render the header facets (if any) renderHeader(context, component, writer); // Render the footer facets (if any) renderFooter(context, component, writer); }
throws IOException { TableMetaInfo info = getMetaInfo(context, table); UIComponent footer = getFacet(table, "footer"); writer.writeAttribute("class", footerClass, "footerClass"); UIComponent facet = getFacet(column, "footer"); if (facet != null) { writer.writeText("", table, null); encodeRecursive(context, facet); renderRowEnd(context, table, writer); writer.writeAttribute("colspan", String.valueOf(info.columns.size()), null); encodeRecursive(context, footer); writer.endElement("td"); renderRowEnd(context, table, writer);
@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } clearMetaInfo(context, component); ((UIData) component).setRowIndex(-1); // Render the ending of this table renderTableEnd(context, component, context.getResponseWriter()); }
TableMetaInfo info = getMetaInfo(context, table); info.newRow(); for (UIColumn column : info.columns) { for (Iterator<UIComponent> gkids = getChildren(column); gkids.hasNext();) { encodeRecursive(context, gkids.next());
protected void renderColumnGroups(FacesContext context, UIComponent table) throws IOException { UIComponent colGroups = getFacet(table, "colgroups"); if (colGroups != null) { encodeRecursive(context, colGroups); } }
rendererParamsNotNull(context, component); if (!shouldEncodeChildren(component)) { return; TableMetaInfo info = getMetaInfo(context, data); if(info.columns.isEmpty()) { renderEmptyTableBody(writer,data); return; int rowIndex = data.getFirst() - 1; int rows = data.getRows(); List<Integer> bodyRows = getBodyRows(context.getExternalContext().getApplicationMap(), data); boolean hasBodyRows = (bodyRows != null && !bodyRows.isEmpty()); boolean wroteTableBody = false; if (!hasBodyRows) { renderTableBodyStart(context, component, writer); renderRowStart(context, component, writer); renderRow(context, component, null, writer); renderRowEnd(context, component, writer); renderedRow = true; this.renderEmptyTableRow(writer, data); renderTableBodyEnd(context, component, writer);
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } UIData data = (UIData) component; data.setRowIndex(-1); // Render the beginning of the table ResponseWriter writer = context.getResponseWriter(); renderTableStart(context, component, writer, ATTRIBUTES); // Render the caption (if any) renderCaption(context, data, writer); // Render column groups (if any) renderColumnGroups(context, data); // Render the header facets (if any) renderHeader(context, component, writer); // Render the footer facets (if any) renderFooter(context, component, writer); }
throws IOException { TableMetaInfo info = getMetaInfo(context, table); UIComponent header = getFacet(table, "header"); String headerClass = (String) table.getAttributes().get("headerClass"); if ((header != null) || (info.hasHeaderFacets)) { encodeRecursive(context, header); writer.endElement("th"); renderRowEnd(context, table, writer); UIComponent facet = getFacet(column, "header"); if (facet != null) { encodeRecursive(context, facet); renderRowEnd(context, table, writer);
@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } clearMetaInfo(context, component); ((UIData) component).setRowIndex(-1); // Render the ending of this table renderTableEnd(context, component, context.getResponseWriter()); }