com.icesoft.faces.component.panelstack

## Class PanelStack

- java.lang.Object
- - javax.faces.component.UIComponent
  - - javax.faces.component.UIComponentBase
    - - javax.faces.component.UIPanel
      - - javax.faces.component.html.HtmlPanelGroup
        - - com.icesoft.faces.component.panelstack.PanelStack

- All Implemented Interfaces:
    java.util.EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder

      public class PanelStack
      extends javax.faces.component.html.HtmlPanelGroup

  Manage a stack of JSF components and allow for one child component to be choosen for rendering. The behaviour is similar to the CardLayout of Java Swing. Property `selectedPanel` defines the id of the child to be rendered. If no child panel is selected or if the selected panel can not be found the first child is rendered.
  Version:
    beta 1.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class javax.faces.component.html.HtmlPanelGroup

      `javax.faces.component.html.HtmlPanelGroup.PropertyKeys`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `COMPONENT_FAMILY`
    `static java.lang.String` | `COMPONENT_TYPE`
    `static java.lang.String` | `LAST_SELECTED_PANEL`

    - ### Fields inherited from class javax.faces.component.UIComponent

      `ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PanelStack()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `applyPhase(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId)`
    `void` | `applyPhase(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.event.PhaseId phaseId)`
    `java.lang.String` | `getColumnClass()` Return the value of the `columnName` property.
    `java.lang.String` | `getFamily()` Return the value of the `COMPONENT_FAMILY` of this component.
    `java.lang.String` | `getRenderedOnUserRole()` Return the value of the `renderedOnUserRole` property.
    `java.lang.String` | `getRowClass()` Return the value of the `rowClass` property.
    `java.lang.String` | `getSelectedPanel()` Return the value of the `selectedPanel` property.
    `java.lang.String` | `getStyle()` Return the value of the `style` property.
    `java.lang.String` | `getStyleClass()` Return the value of the `styleClass` property.
    `boolean` | `isRendered()` Return the value of the `rendered` property.
    `void` | `processDecodes(javax.faces.context.FacesContext context)`
    `void` | `processUpdates(javax.faces.context.FacesContext context)`
    `void` | `processValidators(javax.faces.context.FacesContext context)`
    `void` | `restoreState(javax.faces.context.FacesContext context, java.lang.Object state)` Perform any processing required to restore the state from the entries in the state Object.
    `java.lang.Object` | `saveState(javax.faces.context.FacesContext context)` Gets the state of the instance as a `Serializable` Object.
    `void` | `setRenderedOnUserRole(java.lang.String renderedOnUserRole)` Set the value of the `renderedOnUserRole` property.
    `void` | `setSelectedPanel(java.lang.String selectedPanel)` Set the value of the `selectedPanel` property.
    `void` | `setStyle(java.lang.String style)` Set the value of the `style` property.
    `void` | `setStyleClass(java.lang.String styleClass)` Set the value of the `styleClass` property.

    - ### Methods inherited from class javax.faces.component.html.HtmlPanelGroup

      `getLayout, setLayout`

    - ### Methods inherited from class javax.faces.component.UIComponentBase

      `addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isTransient, markInitialState, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent`

    - ### Methods inherited from class javax.faces.component.UIComponent

      `encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### COMPONENT_TYPE

          public static final java.lang.String COMPONENT_TYPE

      See Also:
        Constant Field Values

    - #### COMPONENT_FAMILY

          public static final java.lang.String COMPONENT_FAMILY

      See Also:
        Constant Field Values

    - #### LAST_SELECTED_PANEL

          public static final java.lang.String LAST_SELECTED_PANEL

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PanelStack

          public PanelStack()

  - ### Method Detail

    - #### getFamily

          public java.lang.String getFamily()

      Return the value of the `COMPONENT_FAMILY` of this component.

      Overrides:
        `getFamily` in class `javax.faces.component.UIPanel`

    - #### setStyle

          public void setStyle(java.lang.String style)

      Set the value of the `style` property.

      Overrides:
        `setStyle` in class `javax.faces.component.html.HtmlPanelGroup`

    - #### getStyle

          public java.lang.String getStyle()

      Return the value of the `style` property.

      Overrides:
        `getStyle` in class `javax.faces.component.html.HtmlPanelGroup`

    - #### setSelectedPanel

          public void setSelectedPanel(java.lang.String selectedPanel)

      Set the value of the `selectedPanel` property.

    - #### getSelectedPanel

          public java.lang.String getSelectedPanel()

      Return the value of the `selectedPanel` property.

    - #### isRendered

          public boolean isRendered()

      Return the value of the `rendered` property.

      Overrides:
        `isRendered` in class `javax.faces.component.UIComponentBase`

    - #### setStyleClass

          public void setStyleClass(java.lang.String styleClass)

      Set the value of the `styleClass` property.

      Overrides:
        `setStyleClass` in class `javax.faces.component.html.HtmlPanelGroup`

    - #### getStyleClass

          public java.lang.String getStyleClass()

      Return the value of the `styleClass` property.

      Overrides:
        `getStyleClass` in class `javax.faces.component.html.HtmlPanelGroup`

    - #### setRenderedOnUserRole

          public void setRenderedOnUserRole(java.lang.String renderedOnUserRole)

      Set the value of the `renderedOnUserRole` property.

    - #### getRenderedOnUserRole

          public java.lang.String getRenderedOnUserRole()

      Return the value of the `renderedOnUserRole` property.

    - #### getRowClass

          public java.lang.String getRowClass()

      Return the value of the `rowClass` property.

    - #### getColumnClass

          public java.lang.String getColumnClass()

      Return the value of the `columnName` property.

    - #### saveState

          public java.lang.Object saveState(javax.faces.context.FacesContext context)

      Gets the state of the instance as a `Serializable` Object.

      Specified by:
        `saveState` in interface `javax.faces.component.StateHolder`
      Overrides:
        `saveState` in class `javax.faces.component.UIComponentBase`

    - #### restoreState

          public void restoreState(javax.faces.context.FacesContext context,
                                   java.lang.Object state)

      Perform any processing required to restore the state from the entries in the state Object.

      Specified by:
        `restoreState` in interface `javax.faces.component.StateHolder`
      Overrides:
        `restoreState` in class `javax.faces.component.UIComponentBase`

    - #### applyPhase

          public void applyPhase(javax.faces.context.FacesContext context,
                                 javax.faces.event.PhaseId phaseId)

      Parameters:
        `context` -
        `phaseId` -

    - #### applyPhase

          public void applyPhase(javax.faces.context.FacesContext context,
                                 javax.faces.component.UIComponent component,
                                 javax.faces.event.PhaseId phaseId)

      Parameters:
        `context` -
        `component` -
        `phaseId` -

    - #### processDecodes

          public void processDecodes(javax.faces.context.FacesContext context)

      Overrides:
        `processDecodes` in class `javax.faces.component.UIComponentBase`

    - #### processValidators

          public void processValidators(javax.faces.context.FacesContext context)

      Overrides:
        `processValidators` in class `javax.faces.component.UIComponentBase`

    - #### processUpdates

          public void processUpdates(javax.faces.context.FacesContext context)

      Overrides:
        `processUpdates` in class `javax.faces.component.UIComponentBase`

Copyright 2025 ICEsoft Technologies Canada, Corp. All Rights Reserved.