Author: konstantin.mishin
Date: 2008-08-04 11:25:02 -0400 (Mon, 04 Aug 2008)
New Revision: 9900
Modified:
trunk/ui/dataTable/src/main/config/component/dataTable.xml
trunk/ui/dataTable/src/main/config/component/subTable.xml
trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java
Log:
RF-4085
Modified: trunk/ui/dataTable/src/main/config/component/dataTable.xml
===================================================================
--- trunk/ui/dataTable/src/main/config/component/dataTable.xml 2008-08-04 15:03:28 UTC
(rev 9899)
+++ trunk/ui/dataTable/src/main/config/component/dataTable.xml 2008-08-04 15:25:02 UTC
(rev 9900)
@@ -199,12 +199,6 @@
<classname>java.util.Collection</classname>
<description>Defines a set of columns ids in the sorting
order</description>
</property>
- <property hidden="true" existintag="false"
exist="false" >
- <name>sortFields</name>
- </property>
- <property hidden="true" existintag="false"
exist="false" >
- <name>filterFields</name>
- </property>
<property>
<name>sortMode</name>
<classname>java.lang.String</classname>
Modified: trunk/ui/dataTable/src/main/config/component/subTable.xml
===================================================================
--- trunk/ui/dataTable/src/main/config/component/subTable.xml 2008-08-04 15:03:28 UTC (rev
9899)
+++ trunk/ui/dataTable/src/main/config/component/subTable.xml 2008-08-04 15:25:02 UTC (rev
9900)
@@ -192,12 +192,6 @@
</property>
<property hidden="true" existintag="false"
exist="false" >
- <name>sortFields</name>
- </property>
- <property hidden="true" existintag="false"
exist="false" >
- <name>filterFields</name>
- </property>
- <property hidden="true" existintag="false"
exist="false" >
<name>summary</name>
<classname>java.lang.Object</classname>
</property>
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java 2008-08-04
15:03:28 UTC (rev 9899)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java 2008-08-04
15:25:02 UTC (rev 9900)
@@ -48,7 +48,7 @@
* JSF component class
*
*/
-public abstract class UIDataTable extends SequenceDataAdaptor implements Sortable2,
Filterable {
+public abstract class UIDataTable extends SequenceDataAdaptor {
Collection<Object> sortPriority = new ArrayList<Object>();
@@ -119,17 +119,19 @@
}
}
sortFields.addAll(sortFieldsMap.values());
- setFilterFields(filterFields);
- setSortFields(sortFields);
ExtendedDataModel dataModel = super.createDataModel();
- AbstractModifiableModel modifiableModel = null;
- if (dataModel instanceof AbstractModifiableModel) {
- modifiableModel = (AbstractModifiableModel)dataModel;
- } else {
- modifiableModel = new ModifiableModel(dataModel, getVar());
+ if ((filterFields != null && !filterFields.isEmpty())
+ || (sortFields != null && !sortFields.isEmpty())) {
+ AbstractModifiableModel modifiableModel = null;
+ if (dataModel instanceof AbstractModifiableModel) {
+ modifiableModel = (AbstractModifiableModel) dataModel;
+ } else {
+ modifiableModel = new ModifiableModel(dataModel, getVar());
+ }
+ modifiableModel.modify(filterFields, sortFields);
+ dataModel = modifiableModel;
}
- modifiableModel.modify(getFilterFields(), getSortFields());
- return modifiableModel;
+ return dataModel;
}
@SuppressWarnings("unchecked")