| java.lang.Object com.sun.rave.web.ui.util.ComponentUtilities
ComponentUtilities | public class ComponentUtilities (Code) | | Methods for general component manipulation.
|
Constructor Summary | |
public | ComponentUtilities() Creates a new instance of ComponentUtilities. |
Method Summary | |
public static String | createPrivateFacetId(UIComponent parent, String facetName) Return an id using the convention
parent.getId() + "_" + facetName
If parent.getId() is null, "_" + facetName
is returned. | public static String | createPrivateFacetName(String facetName) Prefix the facetName parameter with an "_". | public static UIComponent | getPrivateFacet(UIComponent parent, String facetName, boolean matchId) Return a private facet from the the parent component's facet map. | public static void | putPrivateFacet(UIComponent parent, String facetName, UIComponent facet) Store an internally created component utilizing the
internal facet naming convention by mapping the facet
to the name returned by createPrivateFacetName() . | public static void | removePrivateFacet(UIComponent parent, String facetName) Remove an internally created component utilizing the
internal facet naming convention by mapping the facet
to the name returned by createPrivateFacetName() . |
ComponentUtilities | public ComponentUtilities()(Code) | | Creates a new instance of ComponentUtilities.
|
createPrivateFacetId | public static String createPrivateFacetId(UIComponent parent, String facetName)(Code) | | Return an id using the convention
parent.getId() + "_" + facetName
If parent.getId() is null, "_" + facetName
is returned.
Parameters: parent - the component that contains the facet Parameters: facetName - the public facet name an id for a private facet. |
createPrivateFacetName | public static String createPrivateFacetName(String facetName)(Code) | | Prefix the facetName parameter with an "_".
Parameters: facetName - the public facet name a private facet name |
getPrivateFacet | public static UIComponent getPrivateFacet(UIComponent parent, String facetName, boolean matchId)(Code) | | Return a private facet from the the parent component's facet map.
Look for a private facet name by calling
createPrivateFacetName() on the facetName parameter.
If the matchId parameter is true, verify that the facet that is found
has an id that matches the value of
getPrivateFacetId(parent.getId(), facetName) .
If the id's do not match return null and remove the existing facet.
If matchId is false, return the facet if found or null.
Parameters: parent - the component that contains the facet Parameters: facetName - the public facet name a UIComponent if the facet is found else null. |
putPrivateFacet | public static void putPrivateFacet(UIComponent parent, String facetName, UIComponent facet)(Code) | | Store an internally created component utilizing the
internal facet naming convention by mapping the facet
to the name returned by createPrivateFacetName() .
Add the component to the parent's facets map.
Parameters: parent - the component that created the facet Parameters: facetName - the public facet name Parameters: facet - the private facet component instance |
removePrivateFacet | public static void removePrivateFacet(UIComponent parent, String facetName)(Code) | | Remove an internally created component utilizing the
internal facet naming convention by mapping the facet
to the name returned by createPrivateFacetName() .
Remove the component from the parent's facets map.
Parameters: parent - the component that created the facet Parameters: facetName - the public facet name |
|
|