public void encodeRow(FacesContext context, SubTable table, int rowIndex) throws IOException { table.setRowIndex(rowIndex); if (!table.isRowAvailable()) { return; } ResponseWriter writer = context.getResponseWriter(); String clientId = table.getClientId(context); writer.startElement("tr", null); writer.writeAttribute("id", clientId + "_row_" + rowIndex, null); writer.writeAttribute("class", DataTable.ROW_CLASS, null); for (Column column : table.getColumns()) { String style = column.getStyle(); String styleClass = column.getStyleClass(); writer.startElement("td", null); if (style != null) { writer.writeAttribute("style", style, null); } if (styleClass != null) { writer.writeAttribute("class", styleClass, null); } column.encodeAll(context); writer.endElement("td"); } writer.endElement("tr"); }
column.encodeAll(context);
@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { SummaryRow row = (SummaryRow) component; ResponseWriter writer = context.getResponseWriter(); writer.startElement("tr", null); writer.writeAttribute("class", DataTable.SUMMARY_ROW_CLASS, null); for (UIComponent kid : row.getChildren()) { if (kid.isRendered() && kid instanceof Column) { Column column = (Column) kid; String style = column.getStyle(); String styleClass = column.getStyleClass(); writer.startElement("td", null); if (style != null) { writer.writeAttribute("style", style, null); } if (styleClass != null) { writer.writeAttribute("class", styleClass, null); } if (column.getRowspan() != 1) { writer.writeAttribute("rowspan", column.getRowspan(), null); } if (column.getColspan() != 1) { writer.writeAttribute("colspan", column.getColspan(), null); } column.encodeAll(context); writer.endElement("td"); } } writer.endElement("tr"); }
column.encodeAll(context);
public void encodeRow(FacesContext context, SubTable table, int rowIndex) throws IOException { table.setRowIndex(rowIndex); if (!table.isRowAvailable()) { return; } ResponseWriter writer = context.getResponseWriter(); String clientId = table.getClientId(context); writer.startElement("tr", null); writer.writeAttribute("id", clientId + "_row_" + rowIndex, null); writer.writeAttribute("class", DataTable.ROW_CLASS, null); for (Column column : table.getColumns()) { String style = column.getStyle(); String styleClass = column.getStyleClass(); writer.startElement("td", null); if (style != null) writer.writeAttribute("style", style, null); if (styleClass != null) writer.writeAttribute("class", styleClass, null); column.encodeAll(context); writer.endElement("td"); } writer.endElement("tr"); }
@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { SummaryRow row = (SummaryRow) component; ResponseWriter writer = context.getResponseWriter(); writer.startElement("tr", null); writer.writeAttribute("class", DataTable.SUMMARY_ROW_CLASS, null); for (UIComponent kid : row.getChildren()) { if (kid.isRendered() && kid instanceof Column) { Column column = (Column) kid; String style = column.getStyle(); String styleClass = column.getStyleClass(); writer.startElement("td", null); if (style != null) writer.writeAttribute("style", style, null); if (styleClass != null) writer.writeAttribute("class", styleClass, null); if (column.getRowspan() != 1) writer.writeAttribute("rowspan", column.getRowspan(), null); if (column.getColspan() != 1) writer.writeAttribute("colspan", column.getColspan(), null); column.encodeAll(context); writer.endElement("td"); } } writer.endElement("tr"); }
column.encodeAll(context);
column.encodeAll(context);