/** * @param name * @see javax.faces.component.UIComponentBase#getFacet(java.lang.String) */ public UIComponent getFacet(String name) { return original.getFacet(name); }
private List<UIComponent> getComponentResources(FacesContext context, String target, boolean create) { String location = getIdentifier(target); UIComponent facet = getFacet(location); if (facet == null && create) { // Using an implementation specific component type to prevent // component resources being rendered at the incorrect time if // a caller calls UIViewRoot.encodeAll(). facet = context.getApplication().createComponent("javax.faces.ComponentResourceContainer"); facet.setId(location); getFacets().put(location, facet); } return ((facet != null) ? facet.getChildren() : null); }
private List<UIComponent> getComponentResources(FacesContext context, String target, boolean create) { String location = getIdentifier(target); UIComponent facet = getFacet(location); if (facet == null && create) { // Using an implementation specific component type to prevent // component resources being rendered at the incorrect time if // a caller calls UIViewRoot.encodeAll(). facet = context.getApplication().createComponent("javax.faces.ComponentResourceContainer"); facet.setId(location); getFacets().put(location, facet); } return ((facet != null) ? facet.getChildren() : null); }
private static Optional<UIComponent> getMetadataFacet(UIViewRoot root) { return Optional.ofNullable(root.getFacet(UIViewRoot.METADATA_FACET_NAME)); }
private List<UIComponent> getComponentResources(FacesContext context, String target, boolean create) { String location = getIdentifier(target); UIComponent facet = getFacet(location); if (facet == null && create) { // Using an implementation specific component type to prevent // component resources being rendered at the incorrect time if // a caller calls UIViewRoot.encodeAll(). facet = context.getApplication().createComponent("javax.faces.ComponentResourceContainer"); facet.setId(location); getFacets().put(location, facet); } return ((facet != null) ? facet.getChildren() : null); }
private static Optional<UIComponent> getMetadataFacet(UIViewRoot root) { return Optional.ofNullable(root.getFacet(UIViewRoot.METADATA_FACET_NAME)); }
private List<UIComponent> getComponentResources(FacesContext context, String target, boolean create) { String location = getIdentifier(target); UIComponent facet = getFacet(location); if (facet == null && create) { // Using an implementation specific component type to prevent // component resources being rendered at the incorrect time if // a caller calls UIViewRoot.encodeAll(). facet = context.getApplication().createComponent("javax.faces.ComponentResourceContainer"); facet.setId(location); getFacets().put(location, facet); } return ((facet != null) ? facet.getChildren() : null); }
private static Optional<UIComponent> getMetadataFacet(UIViewRoot root) { return Optional.ofNullable(root.getFacet(UIViewRoot.METADATA_FACET_NAME)); }
private List<UIComponent> getComponentResources(FacesContext context, String target, boolean create) { String location = getIdentifier(target); UIComponent facet = getFacet(location); if (facet == null && create) { // Using an implementation specific component type to prevent // component resources being rendered at the incorrect time if // a caller calls UIViewRoot.encodeAll(). facet = context.getApplication().createComponent("javax.faces.ComponentResourceContainer"); facet.setId(location); getFacets().put(location, facet); } return ((facet != null) ? facet.getChildren() : null); }
private static Optional<UIComponent> getMetadataFacet(UIViewRoot root) { return Optional.ofNullable(root.getFacet(UIViewRoot.METADATA_FACET_NAME)); }
private List<UIComponent> getComponentResources(FacesContext context, String target, boolean create) { String location = getIdentifier(target); UIComponent facet = getFacet(location); if (facet == null && create) { // Using an implementation specific component type to prevent // component resources being rendered at the incorrect time if // a caller calls UIViewRoot.encodeAll(). facet = context.getApplication().createComponent("javax.faces.ComponentResourceContainer"); facet.setId(location); getFacets().put(location, facet); } return ((facet != null) ? facet.getChildren() : null); }
private static Optional<UIComponent> getMetadataFacet(UIViewRoot root) { return Optional.ofNullable(root.getFacet(UIViewRoot.METADATA_FACET_NAME)); }
@SuppressWarnings({"UnusedDeclaration"}) private List<UIComponent> getComponentResources(FacesContext context, String target, boolean create) { String location = getIdentifier(target); UIComponent facet = getFacet(location); if (facet == null && create) { // Using an implementation specific component type to prevent // component resources being rendered at the incorrect time if // a caller calls UIViewRoot.encodeAll(). facet = context.getApplication().createComponent("javax.faces.ComponentResourceContainer"); facet.setId(location); getFacets().put(location, facet); } return ((facet != null) ? facet.getChildren() : null); }
private static Optional<UIComponent> getMetadataFacet(UIViewRoot root) { return Optional.ofNullable(root.getFacet(UIViewRoot.METADATA_FACET_NAME)); }
@SuppressWarnings({"UnusedDeclaration"}) private List<UIComponent> getComponentResources(FacesContext context, String target, boolean create) { String location = getIdentifier(target); UIComponent facet = getFacet(location); if (facet == null && create) { // Using an implementation specific component type to prevent // component resources being rendered at the incorrect time if // a caller calls UIViewRoot.encodeAll(). facet = context.getApplication().createComponent("javax.faces.ComponentResourceContainer"); facet.setId(location); getFacets().put(location, facet); } return ((facet != null) ? facet.getChildren() : null); }
private static Optional<UIComponent> getMetadataFacet(UIViewRoot root) { return Optional.ofNullable(root.getFacet(UIViewRoot.METADATA_FACET_NAME)); }
@SuppressWarnings({"UnusedDeclaration"}) private List<UIComponent> getComponentResources(FacesContext context, String target, boolean create) { String location = getIdentifier(target); UIComponent facet = getFacet(location); if (facet == null && create) { // Using an implementation specific component type to prevent // component resources being rendered at the incorrect time if // a caller calls UIViewRoot.encodeAll(). facet = context.getApplication().createComponent("javax.faces.ComponentResourceContainer"); facet.setId(location); getFacets().put(location, facet); } return ((facet != null) ? facet.getChildren() : null); }
/** * @since 2.2 * @param root * @return */ public static boolean hasMetadata(UIViewRoot root) { UIComponent metadataFacet = root.getFacet(UIViewRoot.METADATA_FACET_NAME); return metadataFacet != null ? metadataFacet.getChildCount() > 0 : false; }
/** * @see Faces#getHashParameters() */ public static Collection<HashParam> getHashParameters(FacesContext context) { UIViewRoot viewRoot = context.getViewRoot(); return (viewRoot != null) ? findComponentsInChildren(getViewRoot().getFacet(METADATA_FACET_NAME), HashParam.class) : Collections.<HashParam>emptyList(); }
/** * @see Faces#getHashParameters() */ public static Collection<HashParam> getHashParameters(FacesContext context) { UIViewRoot viewRoot = context.getViewRoot(); return (viewRoot != null) ? findComponentsInChildren(getViewRoot().getFacet(METADATA_FACET_NAME), HashParam.class) : Collections.<HashParam>emptyList(); }