Author: konstantin.mishin
Date: 2010-05-13 14:50:56 -0400 (Thu, 13 May 2010)
New Revision: 17033
Modified:
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/extendedDataTable.js
root/ui-sandbox/tables/trunk/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java
Log:
small fix
Modified:
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/extendedDataTable.js
===================================================================
---
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/extendedDataTable.js 2010-05-13
18:45:25 UTC (rev 17032)
+++
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/extendedDataTable.js 2010-05-13
18:50:56 UTC (rev 17033)
@@ -326,22 +326,26 @@
setColumnWidth(id, width);
}
- this.filter = function(id, filterValue, isClear) {
+ this.filter = function(colunmId, filterValue, isClear) {
if (typeof(filterValue) == "undefined" || filterValue == null) {
filterValue = "";
}
- sendAjax(null, {"rich:filterString" : id + ":" + filterValue +
":" + isClear}); // TODO Maybe, event model should be used here.
+ var map = {}
+ map[id + "rich:filtering"] = colunmId + ":" + filterValue +
":" + isClear;
+ sendAjax(null, map); // TODO Maybe, event model should be used here.
}
this.clearFiltering = function() {
this.filter("", "", true);
}
- this.sort = function(id, sortOrder, isClear) {
+ this.sort = function(colunmId, sortOrder, isClear) {
if (typeof(sortOrder) == "string") {
sortOrder = sortOrder.toUpperCase();
}
- sendAjax(null, {"rich:sortString" : id + ":" + sortOrder +
":" + isClear}); // TODO Maybe, event model should be used here.
+ var map = {}
+ map[id + "rich:sorting"] = colunmId + ":" + sortOrder +
":" + isClear;
+ sendAjax(null, map); // TODO Maybe, event model should be used here.
}
this.clearSorting = function() {
Modified:
root/ui-sandbox/tables/trunk/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java
===================================================================
---
root/ui-sandbox/tables/trunk/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java 2010-05-13
18:45:25 UTC (rev 17032)
+++
root/ui-sandbox/tables/trunk/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java 2010-05-13
18:50:56 UTC (rev 17033)
@@ -195,7 +195,7 @@
assertNull(column1Attributes.get("filterValue"));
assertEquals("filterValue2",
column2Attributes.get("filterValue"));
facesRequest.withParameter(clientId, clientId);
- facesRequest.withParameter("rich:filterString",
"column1:filterValue1:null");
+ facesRequest.withParameter(clientId + "rich:filtering",
"column1:filterValue1:null");
renderer.doDecode(facesContext, component);
assertEquals("filterValue1",
column1Attributes.get("filterValue"));
assertEquals("filterValue2",
column2Attributes.get("filterValue"));
@@ -222,7 +222,7 @@
assertNull(column1Attributes.get("filterValue"));
assertEquals("filterValue2",
column2Attributes.get("filterValue"));
facesRequest.withParameter(clientId, clientId);
- facesRequest.withParameter("rich:filterString",
"column1:filterValue1:true");
+ facesRequest.withParameter(clientId + "rich:filtering",
"column1:filterValue1:true");
renderer.doDecode(facesContext, component);
assertEquals("filterValue1",
column1Attributes.get("filterValue"));
assertNull(column2Attributes.get("filterValue"));
Show replies by date