org.richfaces.fragment.switchable

## Interface SwitchableComponent<T extends ComponentContainer>

- Type Parameters:
    `T` - the container type, for example TabPanel has Tabs etc. Its purpose is to hold the actual content of the panel and provide it in form of initialized page object.
  All Known Subinterfaces:
    Accordion, TabPanel<T>
  All Known Implementing Classes:
    AbstractSwitchableComponent, RichFacesAccordion, RichFacesTabPanel

      public interface SwitchableComponent<T extends ComponentContainer>

  Represents a switchable component. That is component which consists from multiple panels, and it is possible to switch among them. For example: tabPanel, accordion etc.
  Author:
    jhuska

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `switchTo(ChoicePicker picker)` Switches to the container according to the given `picker` rules.
    `T` | `switchTo(int index)` Switches to the container which index is equal to the given `index`
    `T` | `switchTo(String header)` Switches to the container which text representation of header equals to given `header`.

- - ### Method Detail

    - #### switchTo

          T switchTo(ChoicePicker picker)

      Switches to the container according to the given `picker` rules.
      Parameters:
        `picker` -
      Returns:
        initialized container of this switchable component, which was switched into
      Throws:
        `IllegalArgumentException` - if there is no container which satisfies picker rules

    - #### switchTo

          T switchTo(String header)

      Switches to the container which text representation of header equals to given `header`.
      Parameters:
        `header` -
      Returns:
        initialized container of this switchable component, which was switched into
      Throws:
        `IllegalArgumentException` - if there is no container with such a `header`

    - #### switchTo

          T switchTo(int index)

      Switches to the container which index is equal to the given `index`
      Parameters:
        `index` - index of the container to be switched to
      Returns:
        initialized container of this switchable component, which was switched into
      Throws:
        `IllegalArgumentException` - if there is no container with such an `index`

Copyright © 2014 JBoss by Red Hat. All Rights Reserved.