Author: abelevich
Date: 2010-12-16 05:43:45 -0500 (Thu, 16 Dec 2010)
New Revision: 20604
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
Log:
RF-9980
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java
===================================================================
---
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java 2010-12-16
10:27:39 UTC (rev 20603)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java 2010-12-16
10:43:45 UTC (rev 20604)
@@ -103,6 +103,9 @@
public UIComponent getNoData() {
return getFacet(NODATA_FACET_NAME);
}
+
+ @Attribute(defaultValue="Integer.MIN_VALUE")
+ public abstract int getColumns();
@Attribute
public abstract String getNoDataLabel();
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-16
10:27:39 UTC (rev 20603)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-12-16
10:43:45 UTC (rev 20604)
@@ -109,11 +109,8 @@
}
protected int getColumnsCount(UIDataTableBase table) {
- // check for exact value in component
- Integer span = (Integer) table.getAttributes().get("columns");
- int count = (null != span && span.intValue() != Integer.MIN_VALUE) ?
span.intValue()
- : getColumnsCount(table.columns());
- return count;
+ int columns = table.getColumns();
+ return (columns != Integer.MIN_VALUE) ? columns :
getColumnsCount(table.columns());
}
public void encodeTableStructure(ResponseWriter writer, FacesContext context,
UIDataTableBase dataTable) throws IOException {
Show replies by date