Author: sergeyhalipov
Date: 2008-02-27 06:18:19 -0500 (Wed, 27 Feb 2008)
New Revision: 6363
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
trunk/ui/dataTable/src/main/templates/org/richfaces/htmlDataTable.jspx
Log:
Inputs for filter value. Some optimization.
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
---
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-02-27
09:16:36 UTC (rev 6362)
+++
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-02-27
11:18:19 UTC (rev 6363)
@@ -515,13 +515,13 @@
boolean isSingleSortMode = !"multi".equals(table.getSortMode());
for (Iterator<UIComponent> iterator = list.iterator(); iterator
.hasNext();) {
- UIComponent children = iterator.next();
- if (children instanceof org.richfaces.component.UIColumn) {
- org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn)
children;
- children.setId(children.getId());
+ UIComponent child = iterator.next();
+ if (child instanceof org.richfaces.component.UIColumn) {
+ org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn) child;
+ child.setId(child.getId());
if (clientId != null) {
- if (clientId.equals(children.getClientId(context))) {
- String id = children.getId();
+ if (clientId.equals(child.getClientId(context))) {
+ String id = child.getId();
Collection<Object> sortPriority = table.getSortPriority();
if (isSingleSortMode) {
sortPriority.clear();
@@ -534,14 +534,14 @@
column.setSortOrder(Ordering.UNSORTED);
}
}
- String filterValue = map.get(children.getClientId(context) + SORT_FILTER_PARAMETER
+
- "value");
- if (filterValue == null) {
- filterValue = map.get(children.getClientId(context) + SORT_FILTER_PARAMETER);
+ UIInput filterValueInput = (UIInput)child.getFacet(FILTER_INPUT_FACET_NAME);
+ if (null != filterValueInput) {
+ filterValueInput.decode(context);
+ Object submittedValue = filterValueInput.getSubmittedValue();
+ if (null != submittedValue) {
+ column.setFilterValue(filterValueInput.getSubmittedValue().toString());
+ }
}
- if (filterValue != null) {
- column.setFilterValue(filterValue);
- }
}
}
Modified: trunk/ui/dataTable/src/main/templates/org/richfaces/htmlDataTable.jspx
===================================================================
--- trunk/ui/dataTable/src/main/templates/org/richfaces/htmlDataTable.jspx 2008-02-27
09:16:36 UTC (rev 6362)
+++ trunk/ui/dataTable/src/main/templates/org/richfaces/htmlDataTable.jspx 2008-02-27
11:18:19 UTC (rev 6363)
@@ -16,7 +16,6 @@
<h:scripts>
new org.ajax4jsf.javascript.AjaxScript(),
new org.ajax4jsf.javascript.PrototypeScript(),
- /org/richfaces/renderkit/html/scripts/inplaceinput.js,
/org/richfaces/renderkit/html/scripts/data-table.js
</h:scripts>
<f:clientid var="clientId"/>
Show replies by date