myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwald...@apache.org
Subject svn commit: r1335663 - /myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
Date Tue, 08 May 2012 17:57:07 GMT
Author: jwaldman
Date: Tue May  8 17:57:07 2012
New Revision: 1335663

URL: http://svn.apache.org/viewvc?rev=1335663&view=rev
Log:
TRINIDAD-2239 Improve the ancestor based change filtering mechanism by introducing a formal
ComponentChangeFilter
thanks to Prakash Udupa for the patch

Modified:
    myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java

Modified: myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java?rev=1335663&r1=1335662&r2=1335663&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
(original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
Tue May  8 17:57:07 2012
@@ -25,6 +25,7 @@ import java.io.ObjectOutputStream;
 
 import java.net.URL;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
@@ -370,6 +371,20 @@ abstract public class UIXComponentBase e
     
     getFacesBean().removeEntry(_COMPONENT_CHANGE_FILTERS_KEY, componentChangeFilter);
   }
+  
+  /**
+  * Returns all the ComponentChangeFilters that are registered with this component.
+  *
+  * @return An array of registered ComponentChangeFilters
+  */
+  public final ComponentChangeFilter[] getComponentChangeFilters()
+  {
+    Iterator<ComponentChangeFilter> filterIter = 
+      (Iterator<ComponentChangeFilter>)getFacesBean().entries(_COMPONENT_CHANGE_FILTERS_KEY);
+    
+    ArrayList<ComponentChangeFilter> filterList = CollectionUtils.arrayList(filterIter);
+    return filterList.toArray(new ComponentChangeFilter[filterList.size()]);
+  }
 
   @Override
   protected Iterator<UIComponent> getRenderedFacetsAndChildren(



Mime
View raw message