com.sun.webui.jsf.component
Class Accordion

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by com.sun.webui.jsf.component.WebuiComponent
              extended by com.sun.webui.jsf.component.TabContainer
                  extended by com.sun.webui.jsf.component.Accordion
All Implemented Interfaces:
javax.faces.component.NamingContainer, javax.faces.component.StateHolder

public class Accordion
extends TabContainer

An accordion container. It extends the TabContainer and adds some functionality that is specific to the Accordion. An accordion can be thought of as a vertical tab set. It can contain one of more accordion tabs each of which can contain virtually any HTML markup. In general accordions are used for navigational purposes - each tab contains links which when clicked takes the user to different sections (tasks) of the application. The Accordian allows one or more tabs to be open at any given time. When the accordion is configured to allow multiple tabs to be open at any given time it supports "expandAll" and "collapseAll" icons. The expandAll icon when clicked will expand all tabs, and colapseAll, will collapse all open tabs. An accordion can be refreshed. Refreshing the accordion will cause it to render itself and all its children again. The Accordion can also be refreshed to go through all the steps of the JSF lifecycle as opposed to just the render response phase. It is adviseable to use an alternate navigational component if the number of tabs in the accordion are exceeding ten.


Field Summary
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
Accordion()
          Create a new Accordion.
 
Method Summary
 java.lang.String getFamily()
          Return the family for this component.
 java.lang.String getRendererType()
          Return the renderer type associated with this component.
 boolean isMultipleSelect()
          Returns true if multiple tabs can be selected, false otherwise.
 boolean isRefreshIcon()
          Returns true if the Accordion container contains a refresh icon.
 boolean isToggleControls()
          Returns true if the Accordion container contains expand/collapse controls.
 void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
          Restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext _context)
          Save the state of this component.
 void setMultipleSelect(boolean multipleSelect)
          Set to true if multiple tabs can be selected.
 void setRefreshIcon(boolean refreshIcon)
          Set to true if Accordion container should contain a refresh icons.
 void setToggleControls(boolean toggleControls)
          Set to true if Accordion container should contain expand/collapse controls.
 
Methods inherited from class com.sun.webui.jsf.component.TabContainer
findChildTab, getHtmlTemplate, getSelectedTabs, getStyle, getStyleClass, getTabIndex, isLoadOnSelect, isVisible, setHtmlTemplate, setLoadOnSelect, setSelectedTab, setSelectedTabs, setStyle, setStyleClass, setTabIndex, setVisible
 
Methods inherited from class com.sun.webui.jsf.component.WebuiComponent
processDecodes, processUpdates, processValidators, setId, setRendered
 
Methods inherited from class javax.faces.component.UIComponentBase
broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendersChildren, getValueBinding, getValueExpression, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding, setValueExpression
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Accordion

public Accordion()
Create a new Accordion.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.

Overrides:
getFamily in class TabContainer

getRendererType

public java.lang.String getRendererType()

Return the renderer type associated with this component.

Overrides:
getRendererType in class javax.faces.component.UIComponentBase

isMultipleSelect

public boolean isMultipleSelect()
Returns true if multiple tabs can be selected, false otherwise. This value is false by default.


setMultipleSelect

public void setMultipleSelect(boolean multipleSelect)
Set to true if multiple tabs can be selected.


isToggleControls

public boolean isToggleControls()
Returns true if the Accordion container contains expand/collapse controls.


setToggleControls

public void setToggleControls(boolean toggleControls)
Set to true if Accordion container should contain expand/collapse controls.


isRefreshIcon

public boolean isRefreshIcon()
Returns true if the Accordion container contains a refresh icon.


setRefreshIcon

public void setRefreshIcon(boolean refreshIcon)
Set to true if Accordion container should contain a refresh icons.


restoreState

public void restoreState(javax.faces.context.FacesContext _context,
                         java.lang.Object _state)
Restore the state of this component.

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

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext _context)
Save the state of this component.

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


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.