Index: component/src/com/icesoft/faces/component/ext/renderkit/TableRenderer.java =================================================================== --- component/src/com/icesoft/faces/component/ext/renderkit/TableRenderer.java (revision 53) +++ component/src/com/icesoft/faces/component/ext/renderkit/TableRenderer.java (working copy) @@ -231,19 +231,11 @@ UIComponent nextColumn = (UIComponent) childColumns.next(); - if (columnWitdths != null && columnWitdths.hasMoreTokens()) { - width = columnWitdths.nextToken(); - } else { - if (isScrollable(uiComponent)) { - width = "100%"; + if (nextColumn instanceof UIColumn) { + //UIColumn instance + width = deriveColumnWidth(uiComponent, columnWitdths); + if (!nextColumn.isRendered()) continue; - } else { - width = null; - } - - } - if (!nextColumn.isRendered()) continue; - if (nextColumn instanceof UIColumn) { processUIColumnHeader(facesContext, uiComponent, (UIColumn) nextColumn, tr, domContext, facet, element, width, @@ -252,11 +244,12 @@ !childColumns.hasNext()); columnIndex++; } else if (nextColumn instanceof UIColumns) { + //UIColumns instance columnIndex = processUIColumnsHeader(facesContext, uiComponent, (UIColumns) nextColumn, tr, domContext, facet, - element, width, columnIndex, + element, columnWitdths, columnIndex, styleIndex, headerStyleLength); } @@ -495,7 +488,7 @@ UIComponent uiComponent, UIColumns nextColumn, Element tr, DOMContext domContext, String facet, - String element, String width, int columnIndex, + String element, StringTokenizer widths, int columnIndex, int styleIndex, int headerStyleLength) throws IOException { @@ -520,9 +513,11 @@ } } th.setAttribute("class",styleClass); + String width = deriveColumnWidth(uiComponent, widths); if (width != null) { th.setAttribute("style", "width:" + width + ";"); } + //th.setAttribute("colgroup", "col"); domContext.setCursorParent(th); encodeParentAndChildren(facesContext, headerFacet); @@ -1080,4 +1075,15 @@ } } } + + private String deriveColumnWidth(UIComponent uiComponent, StringTokenizer widths) { + String returnValue = null; + if ((widths != null) && widths.hasMoreTokens()) { + returnValue = widths.nextToken(); + } else if (isScrollable(uiComponent)) { + returnValue = "100%"; + } + + return returnValue; + } }