Author: nbelaevski
Date: 2010-12-28 09:27:29 -0500 (Tue, 28 Dec 2010)
New Revision: 20826
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java
Log:
https://issues.jboss.org/browse/RF-10098
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
---
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-12-28
11:14:21 UTC (rev 20825)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-12-28
14:27:29 UTC (rev 20826)
@@ -110,7 +110,7 @@
protected int getColumnsCount(UIDataTableBase table) {
int columns = table.getColumns();
- return (columns != Integer.MIN_VALUE) ? columns :
getColumnsCount(table.columns());
+ return (columns > 0) ? columns : getColumnsCount(table.columns());
}
public void encodeTableStructure(ResponseWriter writer, FacesContext context,
UIDataTableBase dataTable) throws IOException {
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java
===================================================================
---
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java 2010-12-28
11:14:21 UTC (rev 20825)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java 2010-12-28
14:27:29 UTC (rev 20826)
@@ -70,7 +70,7 @@
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-h-c",
null);
int columns = (Integer)component.getAttributes().get("columns");
- if(columns != Integer.MIN_VALUE) {
+ if (columns > 0) {
writer.writeAttribute(HtmlConstants.COLSPAN_ATTRIBUTE, columns, null);
}
}
@@ -109,7 +109,7 @@
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-f-c",
null);
int columns = (Integer)component.getAttributes().get("columns");
- if(columns != Integer.MIN_VALUE) {
+ if (columns > 0) {
writer.writeAttribute(HtmlConstants.COLSPAN_ATTRIBUTE, columns, null);
}
}
@@ -149,7 +149,7 @@
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-nd-c",
null);
int columns = (Integer)component.getAttributes().get("columns");
- if(columns != Integer.MIN_VALUE) {
+ if (columns > 0) {
writer.writeAttribute(HtmlConstants.COLSPAN_ATTRIBUTE, columns, null);
}
}