|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FacesComponentBuilder
The FacesComponentBuilder. A FacesComponentBuilder is specific to one component. It doesn't create the component itself but can be used to create its children and facets. It is also specific to the type of FacesPage that is loading the components.
It will often be used by a FacesComponent
to
build it's contents, as FacesComponent
s are responsible for
building their own contents, instead of allowing the
FacesPage
to load them automatically.
When a FacesPage
is loading and it encounters a
FacesComponent
, it will create the component, and a
FacesComponentBuilder specific to that component, and will then delegate to
the FacesComponent to build it's children and facets. The FacesComponent may
delegate directly to the FacesComponentBuilder or may build it's contents
programmatically.
The build methods may themselves create and use new child FacesComponentBuilders
to create and build the children and facets. In that case the getParent()
will return the closest ancestral FacesComponentBuilder.
Method Summary | |
---|---|
void |
buildAll(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent parent,
boolean includeFacets)
Calls buildChildren(FacesContext, UIComponent) and, if
includeFacets is true all the facets, adding them to the
parameter parent component. |
void |
buildChildren(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent parent)
Builds all the children that were specified under the component getUIComponent() and adds them as children of the parameter
parent component. |
boolean |
buildFacet(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent parent,
java.lang.String facetName)
Builds the facet with the given name that was specified under the component getUIComponent() and adds it as a facet of the
parameter parent component. |
void |
buildFacets(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent parent)
Builds the all the facets that were specified under the component getUIComponent() and adds them as facets of the parameter parent
component. |
FacesComponentBuilder |
getParent()
A FacesComponentBuilder that was used to build the component's parent or used to build the component that's including this component into it's page. |
javax.faces.component.UIComponent |
getUIComponent()
The component whose children and possibly facets will be built. |
boolean |
isFacetAvailable(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent parent,
java.lang.String facetName)
Used to check whether the given facetName is available for the component corresponding to this builder. |
Method Detail |
---|
FacesComponentBuilder getParent()
javax.faces.component.UIComponent getUIComponent()
void buildAll(javax.faces.context.FacesContext context, javax.faces.component.UIComponent parent, boolean includeFacets) throws FacesPageException
buildChildren(FacesContext, UIComponent)
and, if
includeFacets is true
all the facets, adding them to the
parameter parent component.
context
- parent
- includeFacets
- whether to include building the facets or just build the
children.
FacesPageException
void buildChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent parent) throws FacesPageException
getUIComponent()
and adds them as children of the parameter
parent component.
context
- parent
-
FacesPageException
boolean isFacetAvailable(javax.faces.context.FacesContext context, javax.faces.component.UIComponent parent, java.lang.String facetName)
buildFacet(FacesContext, UIComponent, String)
if
loaded was false for the facet component or if some error occurred
building the facet.
context
- parent
- facetName
-
boolean buildFacet(javax.faces.context.FacesContext context, javax.faces.component.UIComponent parent, java.lang.String facetName) throws FacesPageException
getUIComponent()
and adds it as a facet of the
parameter parent component.
context
- parent
- facetName
-
true
if there was a facet with the given name that
was successfully built.
FacesPageException
void buildFacets(javax.faces.context.FacesContext context, javax.faces.component.UIComponent parent) throws FacesPageException
getUIComponent()
and adds them as facets of the parameter parent
component.
context
- parent
- facetName
-
FacesPageException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |