Author: amarkhel
Date: 2009-07-17 13:46:10 -0400 (Fri, 17 Jul 2009)
New Revision: 14960
Modified:
branches/community/3.3.X/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java
branches/community/3.3.X/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
Log:
Fix RF-7510
Modified:
branches/community/3.3.X/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java
===================================================================
---
branches/community/3.3.X/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java 2009-07-17
17:32:45 UTC (rev 14959)
+++
branches/community/3.3.X/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java 2009-07-17
17:46:10 UTC (rev 14960)
@@ -91,16 +91,17 @@
UIComponent component = iterator.next();
if (component instanceof org.richfaces.component.UIColumn) {
org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn)
component;
- FilterField filterField = column.getFilterField();
- if (filterField != null) {
- filterFields.add(filterField);
+ if(column.isRendered()){
+ FilterField filterField = column.getFilterField();
+ if (filterField != null) {
+ filterFields.add(filterField);
+ }
+ SortField2 sortField = column.getSortField();
+ if (sortField != null) {
+ sortFieldsMap.put(component.getId(), sortField);
+ }
}
- SortField2 sortField = column.getSortField();
- if (sortField != null) {
- sortFieldsMap.put(component.getId(), sortField);
- }
}
-
}
List<SortField2> sortFields = new LinkedList<SortField2>();
Collection<Object> sortPriority = getSortPriority();
Modified:
branches/community/3.3.X/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
---
branches/community/3.3.X/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2009-07-17
17:32:45 UTC (rev 14959)
+++
branches/community/3.3.X/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2009-07-17
17:46:10 UTC (rev 14960)
@@ -543,35 +543,37 @@
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 (sortColumnId != null) {
- String columnClientId = child.getClientId(context);
- if (sortColumnId.equals(columnClientId)) {
- String id = child.getId();
- Collection<Object> sortPriority = table.getSortPriority();
- if (isSingleSortMode) {
- sortPriority.clear();
+ if(column.isRendered()){
+ child.setId(child.getId());
+ if (sortColumnId != null) {
+ String columnClientId = child.getClientId(context);
+ if (sortColumnId.equals(columnClientId)) {
+ String id = child.getId();
+ Collection<Object> sortPriority = table.getSortPriority();
+ if (isSingleSortMode) {
+ sortPriority.clear();
+ }
+ if(!sortPriority.contains(id)) {
+ sortPriority.add(id);
+ }
+ column.toggleSortOrder();
+ } else if(isSingleSortMode){
+ column.setSortOrder(Ordering.UNSORTED);
}
- if(!sortPriority.contains(id)) {
- sortPriority.add(id);
+
+ RequestContext requestContext = RequestContext.getInstance(context);
+ requestContext.setAttribute(columnClientId + SORT_DIV, Boolean.TRUE);
+ }
+ UIInput filterValueInput = (UIInput)child.getFacet(FILTER_INPUT_FACET_NAME);
+ if (null != filterValueInput) {
+ filterValueInput.setId(filterValueInput.getId());
+ filterValueInput.decode(context);
+ Object submittedValue = filterValueInput.getSubmittedValue();
+ if (null != submittedValue) {
+ column.setFilterValue(filterValueInput.getSubmittedValue().toString());
}
- column.toggleSortOrder();
- } else if(isSingleSortMode){
- column.setSortOrder(Ordering.UNSORTED);
}
-
- RequestContext requestContext = RequestContext.getInstance(context);
- requestContext.setAttribute(columnClientId + SORT_DIV, Boolean.TRUE);
- }
- UIInput filterValueInput = (UIInput)child.getFacet(FILTER_INPUT_FACET_NAME);
- if (null != filterValueInput) {
- filterValueInput.setId(filterValueInput.getId());
- filterValueInput.decode(context);
- Object submittedValue = filterValueInput.getSubmittedValue();
- if (null != submittedValue) {
- column.setFilterValue(filterValueInput.getSubmittedValue().toString());
- }
- }
+ }
}
}