1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <title>API: tabview YAHOO.widget.Tab (YUI Library)
</title>
5 <link rel=
"stylesheet" type=
"text/css" href=
"assets/api.css">
9 <div id=
"doc3" class=
"yui-t2">
12 <h1>Yahoo! UI Library
</h1>
13 <h3>tabview
<span class=
"subtitle">2.2.0</span></h3>
15 <a href=
"./index.html">Yahoo! UI Library
</a>
16 > <a href=
"./module_tabview.html">tabview
</a>
32 Class
<b>YAHOO.widget.Tab
</b>
33 <span class=
"extends">
34 - extends
<a href=
"YAHOO.util.Element.html">YAHOO.util.Element
</a>
37 <span class=
"extends">
42 <!-- class tree goes here -->
47 <div class=
"summary description">
48 A representation of a Tab's label and content.
51 <div class=
"section constructor details">
52 <h3><a name=
"constructor_detail">Constructor
</a></h3>
55 <strong>YAHOO.widget.Tab
</strong>
67 <div class=
"description">
72 <HTMLElement | String
>
74 (optional) The html element that
75 represents the TabView. An element will be created if none provided.
81 A key map of initial properties
91 <div class=
"section field details">
92 <h3><a name=
"field_detail">Properties
</a></h3>
94 <h4><a name=
"ACTIVE_CLASSNAME">ACTIVE_CLASSNAME
</a>
98 <div class=
"description">
99 The class name applied to active tabs.
104 <div class=
"default">
110 <h4><a name=
"dataConnection">dataConnection
</a>
111 <code>- Object
</code>
114 <div class=
"description">
115 Provides a reference to the connection request object when data is
124 <h4><a name=
"DISABLED_CLASSNAME">DISABLED_CLASSNAME
</a>
125 <code>- String
</code>
128 <div class=
"description">
129 The class name applied to disabled tabs.
134 <div class=
"default">
135 Default Value:
"disabled"
140 <h4><a name=
"LABEL_INNER_TAGNAME">LABEL_INNER_TAGNAME
</a>
141 <code>- String
</code>
144 <div class=
"description">
145 The default tag name for a Tab's inner element.
150 <div class=
"default">
156 <h4><a name=
"loadHandler">loadHandler
</a>
157 <code>- object
</code>
160 <div class=
"description">
161 Object containing success and failure callbacks for loading data.
169 <h4><a name=
"LOADING_CLASSNAME">LOADING_CLASSNAME
</a>
170 <code>- String
</code>
173 <div class=
"description">
174 The class name applied to dynamic tabs while loading.
179 <div class=
"default">
180 Default Value:
"disabled"
190 <div class=
"section field inheritance">
191 <h4>Properties inherited from
<a href=
"YAHOO.util.Element.html">YAHOO.util.Element
</a>:
</h4>
192 <div class=
"content">
195 <a href=
"YAHOO.util.Element.html#DOM_EVENTS">DOM_EVENTS
</a>
199 <div class=
"section field inheritance">
200 <h4>Properties inherited from
<a href=
"YAHOO.util.AttributeProvider.html">YAHOO.util.AttributeProvider
</a>:
</h4>
201 <div class=
"content">
204 <a href=
"YAHOO.util.AttributeProvider.html#_configs">_configs
</a>
208 <div class=
"section field inheritance">
209 <h4>Properties inherited from
<a href=
"YAHOO.util.EventProvider.html">YAHOO.util.EventProvider
</a>:
</h4>
210 <div class=
"content">
213 <a href=
"YAHOO.util.EventProvider.html#__yui_events">__yui_events
</a>,
214 <a href=
"YAHOO.util.EventProvider.html#__yui_subscribers">__yui_subscribers
</a>
219 <div class=
"section method details">
220 <h3><a name=
"methodDetails">Methods
</a></h3>
221 <div class=
"content">
223 <a name=
"initAttributes">initAttributes
</a></h4>
230 <strong>initAttributes
</strong>
240 <div class=
"description">
241 setAttributeConfigs TabView specific properties.
244 <div class=
"description">
249 <code>attr
<Object
></code>
250 Hash of initial attributes
267 <a name=
"toString">toString
</a></h4>
274 <strong>toString
</strong>
279 <div class=
"description">
280 Provides a readable name for the tab.
283 <div class=
"description">
301 <div class=
"section field inheritance">
302 <h4>Methods inherited from
<a href=
"YAHOO.util.Element.html">YAHOO.util.Element
</a>:
</h4>
303 <div class=
"content">
306 <a href=
"YAHOO.util.Element.html#_registerHTMLAttr">_registerHTMLAttr
</a>,
307 <a href=
"YAHOO.util.Element.html#addClass">addClass
</a>,
308 <a href=
"YAHOO.util.Element.html#addListener">addListener
</a>,
309 <a href=
"YAHOO.util.Element.html#appendChild">appendChild
</a>,
310 <a href=
"YAHOO.util.Element.html#appendTo">appendTo
</a>,
311 <a href=
"YAHOO.util.Element.html#fireQueue">fireQueue
</a>,
312 <a href=
"YAHOO.util.Element.html#getElementsByClassName">getElementsByClassName
</a>,
313 <a href=
"YAHOO.util.Element.html#getElementsByTagName">getElementsByTagName
</a>,
314 <a href=
"YAHOO.util.Element.html#getStyle">getStyle
</a>,
315 <a href=
"YAHOO.util.Element.html#hasChildNodes">hasChildNodes
</a>,
316 <a href=
"YAHOO.util.Element.html#hasClass">hasClass
</a>,
317 <a href=
"YAHOO.util.Element.html#initAttributes">initAttributes
</a>,
318 <a href=
"YAHOO.util.Element.html#insertBefore">insertBefore
</a>,
319 <a href=
"YAHOO.util.Element.html#on">on
</a>,
320 <a href=
"YAHOO.util.Element.html#removeChild">removeChild
</a>,
321 <a href=
"YAHOO.util.Element.html#removeClass">removeClass
</a>,
322 <a href=
"YAHOO.util.Element.html#removeListener">removeListener
</a>,
323 <a href=
"YAHOO.util.Element.html#replaceChild">replaceChild
</a>,
324 <a href=
"YAHOO.util.Element.html#replaceClass">replaceClass
</a>,
325 <a href=
"YAHOO.util.Element.html#setStyle">setStyle
</a>
329 <div class=
"section field inheritance">
330 <h4>Methods inherited from
<a href=
"YAHOO.util.AttributeProvider.html">YAHOO.util.AttributeProvider
</a>:
</h4>
331 <div class=
"content">
334 <a href=
"YAHOO.util.AttributeProvider.html#configureAttribute">configureAttribute
</a>,
335 <a href=
"YAHOO.util.AttributeProvider.html#fireBeforeChangeEvent">fireBeforeChangeEvent
</a>,
336 <a href=
"YAHOO.util.AttributeProvider.html#fireChangeEvent">fireChangeEvent
</a>,
337 <a href=
"YAHOO.util.AttributeProvider.html#get">get
</a>,
338 <a href=
"YAHOO.util.AttributeProvider.html#getAttributeConfig">getAttributeConfig
</a>,
339 <a href=
"YAHOO.util.AttributeProvider.html#getAttributeKeys">getAttributeKeys
</a>,
340 <a href=
"YAHOO.util.AttributeProvider.html#refresh">refresh
</a>,
341 <a href=
"YAHOO.util.AttributeProvider.html#register">register
</a>,
342 <a href=
"YAHOO.util.AttributeProvider.html#resetAttributeConfig">resetAttributeConfig
</a>,
343 <a href=
"YAHOO.util.AttributeProvider.html#resetValue">resetValue
</a>,
344 <a href=
"YAHOO.util.AttributeProvider.html#set">set
</a>,
345 <a href=
"YAHOO.util.AttributeProvider.html#setAttributeConfig">setAttributeConfig
</a>,
346 <a href=
"YAHOO.util.AttributeProvider.html#setAttributes">setAttributes
</a>
350 <div class=
"section field inheritance">
351 <h4>Methods inherited from
<a href=
"YAHOO.util.EventProvider.html">YAHOO.util.EventProvider
</a>:
</h4>
352 <div class=
"content">
355 <a href=
"YAHOO.util.EventProvider.html#createEvent">createEvent
</a>,
356 <a href=
"YAHOO.util.EventProvider.html#fireEvent">fireEvent
</a>,
357 <a href=
"YAHOO.util.EventProvider.html#hasEvent">hasEvent
</a>,
358 <a href=
"YAHOO.util.EventProvider.html#subscribe">subscribe
</a>,
359 <a href=
"YAHOO.util.EventProvider.html#unsubscribe">unsubscribe
</a>,
360 <a href=
"YAHOO.util.EventProvider.html#unsubscribeAll">unsubscribeAll
</a>
365 <div class=
"section method details">
366 <h3><a name=
"methodDetails">Events
</a></h3>
367 <div class=
"content">
369 <a name=
"activeChange">activeChange
</a></h4>
375 <strong>activeChange
</strong>
382 <div class=
"description">
383 Fires after the active state is changed.
384 <p>See:
<a href=
"YAHOO.util.Element.html#addListener">Element.addListener
</a></p>
385 <p><strong>Event fields:
</strong><br>
386 <code><String
> type
</code> activeChange
<br>
387 <code><Boolean
>
388 prevValue
</code> the previous value
<br>
389 <code><Boolean
>
390 newValue
</code> the updated value
</p>
391 <p><strong>Usage:
</strong><br>
392 <code>var handler = function(e) {var previous = e.prevValue};
<br>
393 myTabs.addListener('activeChange', handler);
</code></p>
396 <div class=
"description">
406 <a name=
"beforeActiveChange">beforeActiveChange
</a></h4>
412 <strong>beforeActiveChange
</strong>
419 <div class=
"description">
420 Fires before the active state is changed.
421 <p>See:
<a href=
"YAHOO.util.Element.html#addListener">Element.addListener
</a></p>
422 <p>If handler returns false, the change will be cancelled, and the value will not
424 <p><strong>Event fields:
</strong><br>
425 <code><String
> type
</code> beforeActiveChange
<br>
426 <code><Boolean
>
427 prevValue
</code> the current value
<br>
428 <code><Boolean
>
429 newValue
</code> the new value
</p>
430 <p><strong>Usage:
</strong><br>
431 <code>var handler = function(e) {var previous = e.prevValue};
<br>
432 myTabs.addListener('beforeActiveChange', handler);
</code></p>
435 <div class=
"description">
445 <a name=
"beforeContentChange">beforeContentChange
</a></h4>
451 <strong>beforeContentChange
</strong>
458 <div class=
"description">
459 Fires before the tab content is changed.
460 <p>See:
<a href=
"YAHOO.util.Element.html#addListener">Element.addListener
</a></p>
461 <p>If handler returns false, the change will be cancelled, and the value will not
463 <p><strong>Event fields:
</strong><br>
464 <code><String
> type
</code> beforeContentChange
<br>
466 prevValue
</code> the current value
<br>
468 newValue
</code> the new value
</p>
469 <p><strong>Usage:
</strong><br>
470 <code>var handler = function(e) {var previous = e.prevValue};
<br>
471 myTabs.addListener('beforeContentChange', handler);
</code></p>
474 <div class=
"description">
484 <a name=
"beforeLabelChange">beforeLabelChange
</a></h4>
490 <strong>beforeLabelChange
</strong>
497 <div class=
"description">
498 Fires before the tab label is changed.
499 <p>See:
<a href=
"YAHOO.util.Element.html#addListener">Element.addListener
</a></p>
500 <p>If handler returns false, the change will be cancelled, and the value will not
502 <p><strong>Event fields:
</strong><br>
503 <code><String
> type
</code> beforeLabelChange
<br>
505 prevValue
</code> the current value
<br>
507 newValue
</code> the new value
</p>
508 <p><strong>Usage:
</strong><br>
509 <code>var handler = function(e) {var previous = e.prevValue};
<br>
510 myTabs.addListener('beforeLabelChange', handler);
</code></p>
513 <div class=
"description">
523 <a name=
"contentChange">contentChange
</a></h4>
529 <strong>contentChange
</strong>
536 <div class=
"description">
537 Fires after the tab content is changed.
538 <p>See:
<a href=
"YAHOO.util.Element.html#addListener">Element.addListener
</a></p>
539 <p><strong>Event fields:
</strong><br>
540 <code><String
> type
</code> contentChange
<br>
542 prevValue
</code> the previous value
<br>
543 <code><Boolean
>
544 newValue
</code> the updated value
</p>
545 <p><strong>Usage:
</strong><br>
546 <code>var handler = function(e) {var previous = e.prevValue};
<br>
547 myTabs.addListener('contentChange', handler);
</code></p>
550 <div class=
"description">
560 <a name=
"labelChange">labelChange
</a></h4>
566 <strong>labelChange
</strong>
573 <div class=
"description">
574 Fires after the tab label is changed.
575 <p>See:
<a href=
"YAHOO.util.Element.html#addListener">Element.addListener
</a></p>
576 <p><strong>Event fields:
</strong><br>
577 <code><String
> type
</code> labelChange
<br>
579 prevValue
</code> the previous value
<br>
581 newValue
</code> the updated value
</p>
582 <p><strong>Usage:
</strong><br>
583 <code>var handler = function(e) {var previous = e.prevValue};
<br>
584 myTabs.addListener('labelChange', handler);
</code></p>
587 <div class=
"description">
600 <div class=
"section field inheritance">
601 <h4>Events inherited from
<a href=
"YAHOO.util.Element.html">YAHOO.util.Element
</a>:
</h4>
602 <div class=
"content">
605 <a href=
"YAHOO.util.Element.html#available">available
</a>,
606 <a href=
"YAHOO.util.Element.html#contentReady">contentReady
</a>
611 <div class=
"section field details">
612 <h3><a name=
"field_detail">Configuration Attributes
</a></h3>
613 <div class=
"content">
614 <h4><a name=
"activationEvent">activationEvent
</a>
615 <code>- String
</code>
618 <div class=
"description">
619 The event that triggers the tab's activation.
626 <h4><a name=
"active">active
</a>
627 <code>- Boolean
</code>
630 <div class=
"description">
631 Whether or not the tab is currently active.
632 If a dataSrc is set for the tab, the content will be loaded from
640 <h4><a name=
"cacheData">cacheData
</a>
641 <code>- Boolean
</code>
644 <div class=
"description">
645 Whether or not content should be reloaded for every view.
650 <div class=
"default">
655 <h4><a name=
"content">content
</a>
656 <code>- String
</code>
659 <div class=
"description">
667 <h4><a name=
"contentEl">contentEl
</a>
668 <code>- HTMLElement
</code>
671 <div class=
"description">
672 The HTMLElement that contains the tab's content.
679 <h4><a name=
"contentVisible">contentVisible
</a>
680 <code>- Boolean
</code>
683 <div class=
"description">
684 The Whether or not the tab's content is visible.
689 <div class=
"default">
694 <h4><a name=
"dataLoaded">dataLoaded
</a>
695 <code>- Boolean
</code>
698 <div class=
"description">
699 Whether or not any data has been loaded from the server.
706 <h4><a name=
"dataSrc">dataSrc
</a>
707 <code>- String
</code>
710 <div class=
"description">
711 The tab's data source, used for loading content dynamically.
718 <h4><a name=
"dataTimeout">dataTimeout
</a>
719 <code>- Number
</code>
722 <div class=
"description">
723 Number if milliseconds before aborting and calling failure handler.
728 <div class=
"default">
733 <h4><a name=
"disabled">disabled
</a>
734 <code>- Boolean
</code>
737 <div class=
"description">
738 Whether or not the tab is disabled.
745 <h4><a name=
"href">href
</a>
746 <code>- String
</code>
749 <div class=
"description">
750 The href of the tab's anchor element.
755 <div class=
"default">
760 <h4><a name=
"label">label
</a>
761 <code>- String
</code>
764 <div class=
"description">
765 The tab's label text (or innerHTML).
772 <h4><a name=
"labelEl">labelEl
</a>
773 <code>- HTMLElement
</code>
776 <div class=
"description">
777 The element that contains the tab's label.
784 <h4><a name=
"loadMethod">loadMethod
</a>
785 <code>- String
</code>
788 <div class=
"description">
789 The method to use for the data request.
794 <div class=
"default">
803 <div class=
"section field inheritance">
804 <h4>Configuration attributes inherited from
<a href=
"YAHOO.util.Element.html">YAHOO.util.Element
</a>:
</h4>
805 <div class=
"content">
808 <a href=
"YAHOO.util.Element.html#element">element
</a>
822 <li class=
""><a href=
"module_animation.html">animation
</a></li>
824 <li class=
""><a href=
"module_autocomplete.html">autocomplete
</a></li>
826 <li class=
""><a href=
"module_button.html">button
</a></li>
828 <li class=
""><a href=
"module_calendar.html">calendar
</a></li>
830 <li class=
""><a href=
"module_connection.html">connection
</a></li>
832 <li class=
""><a href=
"module_container.html">container
</a></li>
834 <li class=
""><a href=
"module_datasource.html">datasource
</a></li>
836 <li class=
""><a href=
"module_datatable.html">datatable
</a></li>
838 <li class=
""><a href=
"module_dom.html">dom
</a></li>
840 <li class=
""><a href=
"module_dragdrop.html">dragdrop
</a></li>
842 <li class=
""><a href=
"module_element.html">element
</a></li>
844 <li class=
""><a href=
"module_event.html">event
</a></li>
846 <li class=
""><a href=
"module_history.html">history
</a></li>
848 <li class=
""><a href=
"module_logger.html">logger
</a></li>
850 <li class=
""><a href=
"module_menu.html">menu
</a></li>
852 <li class=
""><a href=
"module_slider.html">slider
</a></li>
854 <li class=
"selected"><a href=
"module_tabview.html">tabview
</a></li>
856 <li class=
""><a href=
"module_treeview.html">treeview
</a></li>
858 <li class=
""><a href=
"module_yahoo.html">yahoo
</a></li>
865 <li class=
"selected"><a href=
"YAHOO.widget.Tab.html">YAHOO.widget.Tab
</a></li>
866 <li class=
""><a href=
"YAHOO.widget.TabView.html">YAHOO.widget.TabView
</a></li>
873 <li class=
""><a href=
"Tab.js.html">Tab.js
</a></li>
874 <li class=
""><a href=
"TabView.js.html">TabView.js
</a></li>
881 <li><a href=
"#ACTIVE_CLASSNAME">ACTIVE_CLASSNAME
</a>
882 <!--<code><String></code>-->
884 <li><a href=
"#dataConnection">dataConnection
</a>
885 <!--<code><String></code>-->
887 <li><a href=
"#DISABLED_CLASSNAME">DISABLED_CLASSNAME
</a>
888 <!--<code><String></code>-->
890 <li><a href=
"#LABEL_INNER_TAGNAME">LABEL_INNER_TAGNAME
</a>
891 <!--<code><String></code>-->
893 <li><a href=
"#loadHandler">loadHandler
</a>
894 <!--<code><String></code>-->
896 <li><a href=
"#LOADING_CLASSNAME">LOADING_CLASSNAME
</a>
897 <!--<code><String></code>-->
905 <li><!--<code>void</code>-->
906 <a href=
"#initAttributes">initAttributes
</a>
908 <li><!--<code>void</code>-->
909 <a href=
"#toString">toString
</a>
918 <a href=
"#activeChange">activeChange
</a>
921 <a href=
"#beforeActiveChange">beforeActiveChange
</a>
924 <a href=
"#beforeContentChange">beforeContentChange
</a>
927 <a href=
"#beforeLabelChange">beforeLabelChange
</a>
930 <a href=
"#contentChange">contentChange
</a>
933 <a href=
"#labelChange">labelChange
</a>
939 <h4>Configuration Attributes
</h4>
942 <a href=
"#activationEvent">activationEvent
</a>
945 <a href=
"#active">active
</a>
948 <a href=
"#cacheData">cacheData
</a>
951 <a href=
"#content">content
</a>
954 <a href=
"#contentEl">contentEl
</a>
957 <a href=
"#contentVisible">contentVisible
</a>
960 <a href=
"#dataLoaded">dataLoaded
</a>
963 <a href=
"#dataSrc">dataSrc
</a>
966 <a href=
"#dataTimeout">dataTimeout
</a>
969 <a href=
"#disabled">disabled
</a>
972 <a href=
"#href">href
</a>
975 <a href=
"#label">label
</a>
978 <a href=
"#labelEl">labelEl
</a>
981 <a href=
"#loadMethod">loadMethod
</a>
991 Copyright
© 2007 Yahoo! Inc. All rights reserved.