Oracle Fusion Middleware Tag Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81455-03

Tag name: <af:switcher>
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.)

The switcher is a purely logical server-side component. It does not generate any content itself and has no client-side representation (no client component). Hence switching which facet of the switcher renders requires a server round-trip.

Initial render works as normal, but you cannot switch facets since only the displayed facet is rendered.

## Events

Type | Phases | Description
--- | --- | ---

org.apache.myfaces.trinidad.event.AttributeChangeEvent | Apply Request Values | Event delivered to describe an attribute change.

## Attributes

Name | Type | Supports EL? | Description
--- | --- | --- | ---

attributeChangeListener | javax.faces.el.MethodBinding | a method reference to an attribute change listener
binding | UIXSwitcher | Only EL | a binding reference to store the component instance
defaultFacet | String | the name of the facet to render and process if "facetName" is null or otherwise does not refer to an existing facet.
facetName | String | Yes | the name of the facet to render and process.
id | String | No | the identifier for the component.
rendered | boolean | Yes | whether the bean is rendered. When set to false, no output will be delivered for this bean.