com.sun.webui.jsf.component
Class Tab

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UICommand
              extended by com.sun.webui.jsf.component.WebuiCommand
                  extended by com.sun.webui.jsf.component.Hyperlink
                      extended by com.sun.webui.jsf.component.Tab
All Implemented Interfaces:
com.sun.webui.jsf.component.ComplexComponent, javax.faces.component.ActionSource, javax.faces.component.ActionSource2, javax.faces.component.NamingContainer, javax.faces.component.StateHolder

public class Tab
extends Hyperlink
implements javax.faces.component.NamingContainer

The Tab component represents one tab in a tab set. Tabs must be children of a TabSet, or of another Tab.

Tab extends Hyperlink. Clicking on a tab therefore submits the current page.


Field Summary
 
Fields inherited from class javax.faces.component.UICommand
COMPONENT_FAMILY, COMPONENT_TYPE
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
Tab()
          Create a new instance of Tab.
Tab(java.lang.String text)
          Create a new instance of Tab with the text property set to the value specified.
 
Method Summary
 void broadcast(javax.faces.event.FacesEvent event)
          Customized implementation that, in addition to invoking all other action listeners for this tab, invokes the action listener method bound by the action listener expression on this tab's parent tabSet, if there is one.
 java.lang.String getFamily()
          Return the family for this component.
 java.lang.String getOnDblClick()
          Scripting code executed when a mouse double click occurs over this component.
 java.lang.String getSelectedChildId()
          Returns the id of this tab's currently selected Tab child, or null if one is not selected.
 int getTabChildCount()
          Returns the number of children of this tab that are themselves tabs.
 java.util.List<Tab> getTabChildren()
          Returns a list of all children of this tab that are themselves tabs.
static TabSet getTabSet(Tab tab)
          Utility method that returns the tabSet instance that contains the tab specified.
 java.lang.Object getText()
          The text to be displayed for the hyperlink.
 java.lang.Object getValue()
           
 void processDecodes(javax.faces.context.FacesContext context)
          Customized implementation that allows child components to decode possible submitted input only if the component is part of the currently selected tab.
 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 setSelectedChildId(java.lang.String selectedChildId)
          Set the id of this tab's currently selected Tab child to the value specified.
 
Methods inherited from class com.sun.webui.jsf.component.Hyperlink
getFocusElementId, getHtmlTemplate, getIndicatorComponent, getLabeledElementId, getOnBlur, getOnClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getPrimaryElementID, getRendererType, getShape, getStyle, getStyleClass, getTabIndex, getTarget, getToolTip, getType, getUrl, getUrlLang, getValueExpression, isDisabled, isVisible, setDisabled, setHtmlTemplate, setOnBlur, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setShape, setStyle, setStyleClass, setTabIndex, setTarget, setText, setToolTip, setType, setUrl, setUrlLang, setValueExpression, setVisible, toString
 
Methods inherited from class com.sun.webui.jsf.component.WebuiCommand
getAction, getActionExpression, getActionListener, getActionListenerExpression, processUpdates, processValidators, setActionListenerExpression, setId, setImmediate, setRendered
 
Methods inherited from class javax.faces.component.UICommand
addActionListener, getActionListeners, isImmediate, queueEvent, removeActionListener, setAction, setActionExpression, setActionListener, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tab

public Tab()
Create a new instance of Tab.


Tab

public Tab(java.lang.String text)
Create a new instance of Tab with the text property set to the value specified.

Method Detail

getFamily

public java.lang.String getFamily()
Description copied from class: Hyperlink

Return the family for this component.

Overrides:
getFamily in class Hyperlink

getOnDblClick

public java.lang.String getOnDblClick()
Scripting code executed when a mouse double click occurs over this component.

Overrides:
getOnDblClick in class Hyperlink

getValue

public java.lang.Object getValue()
Overrides:
getValue in class Hyperlink

getText

public java.lang.Object getText()
Description copied from class: Hyperlink

The text to be displayed for the hyperlink.

Overrides:
getText in class Hyperlink

getSelectedChildId

public java.lang.String getSelectedChildId()
Returns the id of this tab's currently selected Tab child, or null if one is not selected.


setSelectedChildId

public void setSelectedChildId(java.lang.String selectedChildId)
Set the id of this tab's currently selected Tab child to the value specified.


getTabChildCount

public int getTabChildCount()
Returns the number of children of this tab that are themselves tabs.


getTabChildren

public java.util.List<Tab> getTabChildren()
Returns a list of all children of this tab that are themselves tabs.


processDecodes

public void processDecodes(javax.faces.context.FacesContext context)
Customized implementation that allows child components to decode possible submitted input only if the component is part of the currently selected tab. Some input components cannot distinguish between a null submitted value that is the result of the user unselecting the value (e.g. in the case of a checkbox or listbox) from the case that is the result of the component being hidden in an unselected tab.

Overrides:
processDecodes in class WebuiCommand
Parameters:
context - FacesContext for this request.

broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException
Customized implementation that, in addition to invoking all other action listeners for this tab, invokes the action listener method bound by the action listener expression on this tab's parent tabSet, if there is one.

Overrides:
broadcast in class WebuiCommand
Parameters:
event - FacesEvent to be broadcast
Throws:
javax.faces.event.AbortProcessingException - Signal the JavaServer Faces implementation that no further processing on the current event should be performed

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 Hyperlink

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 Hyperlink

getTabSet

public static TabSet getTabSet(Tab tab)
Utility method that returns the tabSet instance that contains the tab specified.



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