Documentation

Search 

Contents

  1. Introduction
  2. Getting Started
  3. Trinidad Concepts
  4. Code View Support
  5. Design View Support
  6. Tag Object Toolbars
  7. Server Behaviors
  8. Property Inspectors
Selected 9. Trinidad Tag Reference

10. Trinidad Core Tag Reference

Contents > Trinidad Core Tag Reference > tr:switcher

tr:switcher

The tr:switcher tag allows different facets to be displayed.

Example

<tr:switcher facetName="default" defaultFacet="default">
  <f:facet name="default">
    <tr:outputText value="You have not picked anyone I know" />
  </f:facet>
  <f:facet name="Roger">
    <tr:outputText value="You have picked Roger"/>
  </f:facet>
  <f:facet name="Peter">
    <tr:outputText value="You have picked Peter"/>
  </f:facet>   
</tr:switcher>

Rendered Output

Rendered tr:switcher tag

Tag Attributes

attributeChangeListener Text
 
The attributeChangeListener attribute contains the reference to a method that is invoked when the renderer changes a property without the application’s request.
binding Expression
 
The value-binding expression linking this component tag to a backing bean property.
defaultFacet Text
 
The defaultFacet attribute sets the name of the facet to display if the facetName attribute is not specified.
facetName Text
 
The facetName attribute sets the name of the facet to display.
id Text
 
The unique identifier value for this component. The value must be unique within the closest naming container.
rendered Boolean
 
A value-binding expression that evaluates to a Boolean condition indicating if this component should be rendered.