You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sl...@apache.org on 2008/09/11 00:48:42 UTC
svn commit: r694053 -
/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/component/UIViewRoot.java
Author: slessard
Date: Wed Sep 10 15:48:42 2008
New Revision: 694053
URL: http://svn.apache.org/viewvc?rev=694053&view=rev
Log:
MYFACES-1925: Implement UIViewRoot.getComponentResources
Modified:
myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/component/UIViewRoot.java
Modified: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/component/UIViewRoot.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/component/UIViewRoot.java?rev=694053&r1=694052&r2=694053&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/component/UIViewRoot.java (original)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/component/UIViewRoot.java Wed Sep 10 15:48:42 2008
@@ -547,9 +547,21 @@
public List<UIComponent> getComponentResources(FacesContext context, String target)
{
- // TODO: JSF 2.0 #19
+ // Locate the facet for the component by calling getFacet() using target as the argument
+ UIComponent facet = getFacet(target);
- return null;
+ // If the facet is not found
+ if (facet == null)
+ {
+ facet = context.getApplication().createComponent("javax.faces.Panel");
+ facet.setId(target);
+
+ // Add the facet to the facets Map using target as the key
+ getFacets().put(target, facet);
+ }
+
+ // Return the children of the facet
+ return facet.getChildren();
}
public Map<String,Object> getViewMap()