Author: pgolawski
Date: 2008-09-23 02:38:26 -0400 (Tue, 23 Sep 2008)
New Revision: 10538
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java
Log:
Adding facets to both dataChildren and fixed children to make both supports and
header/footer work
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java
===================================================================
---
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2008-09-22
16:36:43 UTC (rev 10537)
+++
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2008-09-23
06:38:26 UTC (rev 10538)
@@ -20,6 +20,7 @@
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.model.ExtendedDataModel;
+import org.apache.commons.collections.iterators.IteratorChain;
import org.richfaces.event.extdt.ChangeColumnVisibilityEvent;
import org.richfaces.event.extdt.ColumnResizeEvent;
import org.richfaces.event.extdt.DragDropEvent;
@@ -335,5 +336,20 @@
protected void resetModel() {
super.resetDataModel();
}
+
+ @SuppressWarnings("unchecked")
+ public Iterator<UIComponent> fixedChildren() {
+ IteratorChain chain = new IteratorChain(getFacets().values().iterator());
+ //RF-1248 Adding facets to both dataChildren and fixed children
+ //To make both supports and header/footer work
+ for (Iterator<UIComponent> i = getChildren().iterator(); i.hasNext(); ) {
+ UIComponent kid = (UIComponent)i.next();
+ if (kid instanceof Column || kid instanceof UIColumn) {
+ chain.addIterator(kid.getFacets().values().iterator());
+ }
+ }
+
+ return chain;
+ }
}
Show replies by date