public List<UIComponent> getComponentResources(FacesContext context, String target)
    {
        if (target == null)
        {
            throw new NullPointerException("target");
        }
        // Locate the facet for the component by calling getFacet() using target as the argument
        UIComponent facet = getFacet(target);

        /*
        // If the facet is not found,
        if (facet == null)
        {
            // create the facet by calling context.getApplication().createComponent()
            // using javax.faces.Panel as the argument
            facet = context.getApplication().createComponent("javax.faces.Panel");

            // Set the id of the facet to be target
            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
        // The API doc indicates that this method should "Return an unmodifiable
        // List of UIComponents for the provided target argument."
        // and also that "If no children are found for the facet, return Collections.emptyList()."
        List<UIComponent> children = facet.getChildren();
        return ( children == null ? Collections.<UIComponent>emptyList() : Collections.unmodifiableList(children) );
        */
        if (facet != null)
        {
            if (facet.getChildCount() > 0)
            {
                return Collections.unmodifiableList(facet.getChildren());
            }
            else
            {
                return Collections.<UIComponent>emptyList();
            }
        }
        return Collections.<UIComponent>emptyList();
    }
public List < UIComponent > getComponentResources ( FacesContext context , String target ) { if ( target == null ) { throw new NullPointerException ( "target" ) ; } UIComponent facet = getFacet ( target ) ; if ( facet != null ) { if ( facet . getChildCount ( ) > 0 ) { return Collections . unmodifiableList ( facet . getChildren ( ) ) ; } else { return Collections . < UIComponent > emptyList ( ) ; } } return Collections . < UIComponent > emptyList ( ) ; }
@since 2.0