YUI recommends YUI3.

YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.

This documentation is no longer maintained.

Yahoo! UI Library

tabview  2.9.0

Yahoo! UI Library > tabview > YAHOO.widget.Tab
Search:
 
Filters

Class YAHOO.widget.Tab - extends YAHOO.util.Element

A representation of a Tab's label and content.

Constructor

YAHOO.widget.Tab ( element , properties )
Parameters:
element <HTMLElement | String> (optional) The html element that represents the Tab. An element will be created if none provided.
properties <Object> A key map of initial properties

Properties

ACTIVE_CLASSNAME - String

The class name applied to active tabs.
Default Value: "selected"

ACTIVE_TITLE - String

The title applied to active tabs.
Default Value: "active"

dataConnection - Object

Provides a reference to the connection request object when data is loaded dynamically.

DISABLED_CLASSNAME - String

The class name applied to disabled tabs.
Default Value: "disabled"

HIDDEN_CLASSNAME - String

The class name applied to active tabs.
Default Value: "yui-hidden"

LABEL_INNER_TAGNAME - String

The default tag name for a Tab's inner element.
Default Value: "em"

loadHandler - object

Object containing success and failure callbacks for loading data.

LOADING_CLASSNAME - String

The class name applied to dynamic tabs while loading.
Default Value: "disabled"

Properties inherited from YAHOO.util.Element:

Properties inherited from YAHOO.util.AttributeProvider:

Methods

initAttributes

void initAttributes ( attr )
setAttributeConfigs Tab specific properties.
Parameters:
attr <Object> Hash of initial attributes

toString

toString ( )
Provides a readable name for the tab.
Returns:
String

Events

activationEventChange

activationEventChange ( event )
Fires when the value for the configuration attribute 'activationEvent' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

activeChange

activeChange ( event )
Fires when the value for the configuration attribute 'active' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeActivationEventChange

beforeActivationEventChange ( event )
Fires before the value for the configuration attribute 'activationEvent' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeActiveChange

beforeActiveChange ( event )
Fires before the value for the configuration attribute 'active' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeCacheDataChange

beforeCacheDataChange ( event )
Fires before the value for the configuration attribute 'cacheData' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeContentChange

beforeContentChange ( event )
Fires before the value for the configuration attribute 'content' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeContentElChange

beforeContentElChange ( event )
Fires before the value for the configuration attribute 'contentEl' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeContentVisibleChange

beforeContentVisibleChange ( event )
Fires before the value for the configuration attribute 'contentVisible' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeDataLoadedChange

beforeDataLoadedChange ( event )
Fires before the value for the configuration attribute 'dataLoaded' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeDataSrcChange

beforeDataSrcChange ( event )
Fires before the value for the configuration attribute 'dataSrc' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeDataTimeoutChange

beforeDataTimeoutChange ( event )
Fires before the value for the configuration attribute 'dataTimeout' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeDisabledChange

beforeDisabledChange ( event )
Fires before the value for the configuration attribute 'disabled' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeHrefChange

beforeHrefChange ( event )
Fires before the value for the configuration attribute 'href' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeLabelChange

beforeLabelChange ( event )
Fires before the value for the configuration attribute 'label' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeLabelElChange

beforeLabelElChange ( event )
Fires before the value for the configuration attribute 'labelEl' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeLoadMethodChange

beforeLoadMethodChange ( event )
Fires before the value for the configuration attribute 'loadMethod' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforePostDataChange

beforePostDataChange ( event )
Fires before the value for the configuration attribute 'postData' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

cacheDataChange

cacheDataChange ( event )
Fires when the value for the configuration attribute 'cacheData' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

contentChange

contentChange ( event )
Fires when the value for the configuration attribute 'content' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

contentElChange

contentElChange ( event )
Fires when the value for the configuration attribute 'contentEl' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

contentVisibleChange

contentVisibleChange ( event )
Fires when the value for the configuration attribute 'contentVisible' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

dataLoadedChange

dataLoadedChange ( event )
Fires when the value for the configuration attribute 'dataLoaded' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

dataSrcChange

dataSrcChange ( event )
Fires when the value for the configuration attribute 'dataSrc' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

dataTimeoutChange

dataTimeoutChange ( event )
Fires when the value for the configuration attribute 'dataTimeout' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

disabledChange

disabledChange ( event )
Fires when the value for the configuration attribute 'disabled' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

hrefChange

hrefChange ( event )
Fires when the value for the configuration attribute 'href' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

labelChange

labelChange ( event )
Fires when the value for the configuration attribute 'label' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

labelElChange

labelElChange ( event )
Fires when the value for the configuration attribute 'labelEl' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

loadMethodChange

loadMethodChange ( event )
Fires when the value for the configuration attribute 'loadMethod' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

postDataChange

postDataChange ( event )
Fires when the value for the configuration attribute 'postData' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

remove

remove ( An )
Fires when a tab is removed from the tabview
Parameters:
An <Event> event object with fields for "type" ("remove") and "tabview" (the tabview instance it was removed from)

Configuration Attributes

activationEvent - String

The event that triggers the tab's activation.

active - Boolean

Whether or not the tab is currently active. If a dataSrc is set for the tab, the content will be loaded from the given source.

cacheData - Boolean

Whether or not content should be reloaded for every view.
Default Value: false

content - String

The tab's content.

contentEl - HTMLElement

The HTMLElement that contains the tab's content.

contentVisible - Boolean

The Whether or not the tab's content is visible.
Default Value: false

dataLoaded - Boolean

Whether or not any data has been loaded from the server.

dataSrc - String

The tab's data source, used for loading content dynamically.

dataTimeout - Number

Number if milliseconds before aborting and calling failure handler.
Default Value: null

disabled - Boolean

Whether or not the tab is disabled.

href - String

The href of the tab's anchor element.
Default Value: '#'

label - String

The tab's label text (or innerHTML).

labelEl - HTMLElement

The element that contains the tab's label.

loadMethod - String

The method to use for the data request.
Default Value: "GET"

postData - object

Arguments to pass when POST method is used
Default Value: null

Configuration attributes inherited from YAHOO.util.Element:


Copyright © 2011 Yahoo! Inc. All rights reserved.