|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.component.UIComponent
org.apache.myfaces.trinidad.component.UIXComponent
org.apache.myfaces.trinidad.component.UIXComponentBase
org.apache.myfaces.trinidad.component.UIXSwitcher
public class UIXSwitcher
The switcher component dynamically decides which facet component should be rendered. It has two properties. The switcher will render the facet matching "facetName"; however, if no such facet exists (or "facetName" is null), and "defaultFacet" has been set, then that facet will be used instead. (It's possible to achieve this same functionality by using a panelGroup and binding the "rendered" property of each child, but this component can be simpler. Ordinary children of the switcher component are not rendered at all.)
| Type | Phases | Description |
|---|---|---|
org.apache.myfaces.trinidad.event.AttributeChangeEvent |
Invoke Application Apply Request Values |
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing. |
| Field Summary | |
|---|---|
static java.lang.String |
COMPONENT_FAMILY
|
static java.lang.String |
COMPONENT_TYPE
|
static PropertyKey |
DEFAULT_FACET_KEY
|
static PropertyKey |
FACET_NAME_KEY
|
static FacesBean.Type |
TYPE
|
| Fields inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase |
|---|
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY |
| Fields inherited from class javax.faces.component.UIComponent |
|---|
bindings |
| Constructor Summary | |
|---|---|
|
UIXSwitcher()
Construct an instance of the UIXSwitcher. |
protected |
UIXSwitcher(java.lang.String rendererType)
Construct an instance of the UIXSwitcher. |
| Method Summary | ||
|---|---|---|
void |
encodeChildren(javax.faces.context.FacesContext context)
Only render the currently active facet. |
|
protected FacesBean.Type |
getBeanType()
|
|
java.lang.String |
getDefaultFacet()
Gets the name of the facet to render and process if "facetName" is null or otherwise does not refer to an existing facet. |
|
java.lang.String |
getFacetName()
Gets the name of the facet to render and process. |
|
java.lang.String |
getFamily()
|
|
boolean |
getRendersChildren()
Override to return true. |
|
boolean |
isFlatteningChildren(javax.faces.context.FacesContext context)
Returns true if this FlattenedComponent is currently flattening its children |
|
void |
processDecodes(javax.faces.context.FacesContext context)
Only decode the currently active facet. |
|
|
processFlattenedChildren(javax.faces.context.FacesContext context,
ComponentProcessingContext cpContext,
ComponentProcessor<S> childProcessor,
S callbackContext)
Processes the selected switcher facet |
|
void |
processUpdates(javax.faces.context.FacesContext context)
Only process updates on the currently active facet. |
|
void |
processValidators(javax.faces.context.FacesContext context)
Only process validations on the currently active facet. |
|
void |
setDefaultFacet(java.lang.String defaultFacet)
Sets the name of the facet to render and process if "facetName" is null or otherwise does not refer to an existing facet. |
|
void |
setFacetName(java.lang.String facetName)
Sets the name of the facet to render and process. |
|
| Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponent |
|---|
isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setUpEncodingContext, setupVisitingContext, tearDownEncodingContext, tearDownVisitingContext, visitTree, visitTree |
| Methods inherited from class javax.faces.component.UIComponent |
|---|
getContainerClientId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final FacesBean.Type TYPE
public static final PropertyKey FACET_NAME_KEY
public static final PropertyKey DEFAULT_FACET_KEY
public static final java.lang.String COMPONENT_FAMILY
public static final java.lang.String COMPONENT_TYPE
| Constructor Detail |
|---|
public UIXSwitcher()
protected UIXSwitcher(java.lang.String rendererType)
| Method Detail |
|---|
public void processDecodes(javax.faces.context.FacesContext context)
processDecodes in class UIXComponentBasepublic void processValidators(javax.faces.context.FacesContext context)
processValidators in class UIXComponentBasepublic void processUpdates(javax.faces.context.FacesContext context)
processUpdates in class UIXComponentBase
public <S> boolean processFlattenedChildren(javax.faces.context.FacesContext context,
ComponentProcessingContext cpContext,
ComponentProcessor<S> childProcessor,
S callbackContext)
throws java.io.IOException
processFlattenedChildren in interface FlattenedComponentcontext - Current FacesContextcpContext - ComponentProcesingContext represetning the current child iteration statechildProcessor - ComponentProcessor to call for each flattened childcallbackContext - childProcessor-specific context to be passed on each call to the
childProcessor
true if this FlattenedComponent actually processed any children
java.io.IOException - if an error occurs while processing childrenUIXComponent.processFlattenedChildren(FacesContext, ComponentProcessingContext, ComponentProcessor, UIComponent, Object),
UIXComponent.processFlattenedChildren(FacesContext, ComponentProcessingContext, ComponentProcessor, Iterable, Object),
FlattenedComponent.isFlatteningChildren(javax.faces.context.FacesContext)public boolean isFlatteningChildren(javax.faces.context.FacesContext context)
true if this FlattenedComponent is currently flattening its children
isFlatteningChildren in interface FlattenedComponentcontext - FacesContext
true if this FlattenedComponent is currently flattening its childrenFlattenedComponent.processFlattenedChildren(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.component.ComponentProcessingContext, org.apache.myfaces.trinidad.component.ComponentProcessor, S)
public void encodeChildren(javax.faces.context.FacesContext context)
throws java.io.IOException
encodeChildren in class UIXComponentBasejava.io.IOExceptionpublic boolean getRendersChildren()
getRendersChildren in class UIXComponentBasepublic final java.lang.String getFacetName()
public final void setFacetName(java.lang.String facetName)
facetName - the new facetName valuepublic final java.lang.String getDefaultFacet()
public final void setDefaultFacet(java.lang.String defaultFacet)
defaultFacet - the new defaultFacet valuepublic java.lang.String getFamily()
getFamily in class UIXComponentBaseprotected FacesBean.Type getBeanType()
getBeanType in class UIXComponentBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||