Class WFTabView

Description

The WFTabView widget provides a tabbed-interface wrapper around several templates.

The WFTabView implements all tab content on a single HTML page; clicking on a tab simply changes what's visible, it doens't round-trip to the server.

All templates must be designed for the same page; the sub-templates are simply chunks of what would normally be a single template.

Located in /framework/widgets/WFTabView.php (line 55)

WFObject
   |
   --WFView
      |
      --WFWidget
         |
         --WFTabView
Variable Summary
object WFTabContent $activeTab
string $defaultTabID
boolean $onePageMode
array $tabs
Method Summary
static void exposedProperties ()
WFTabView __construct ( $id,  $page)
object WFTabContent activeTab ()
string activeTabID ()
string activeTabLabel ()
void addTab (string $id, string $label, string $tpl)
boolean isActiveTab (object WFTabContent $tab)
void removeTab (string $id, string $newActiveTabID)
void render ([ $blockContent = NULL])
void restoreState ()
void setActiveTabID (string $id)
void setDebugShowAllTabs ( $bool)
void setDefaultTabID (string $defaultTabID)
void setDefaultTabIDIfNoDefault (string $defaultTabID)
array tabs ()
Variables
object WFTabContent $activeTab (line 64)
  • var: The currently active WFTabContent object.
  • access: protected
boolean $debugShowAllTabs (line 85)
  • var: TRUE to show all tabs at once, for debug purposes. FALSE for normal behavior.
  • access: protected
string $defaultTabID (line 68)
  • var: The ID of the tab to make active by default if there is no active tab.
  • access: protected
boolean $onePageMode (line 81)
  • var:

    TRUE to display the tabs in "onePage" mode, which means that all content of the tabs are part of a single page. In this case, all tab content views are rendered and put in divs. Only the "active" tab will be visible, and javascript is added to the page to help toggle between tabs when clicked.

    OnePage mode is designed to break up parts of the same form into smaller chunks, but that should still be all submitted together. For design consistency, you should put the form's submit buttons OUTSIDE the tabbed view so users understand that all tabs are part of the same form.

    The other mode, non-onePage mode, will actually load a different URI for each page. Each tab is considered its own stand-alone view. NOT YET IMPLEMENTED.

  • access: protected
array $tabs (line 60)
  • var: Array of WFTabContent objects.
  • access: protected

Inherited Variables

Inherited from WFWidget

WFWidget::$bindings
WFWidget::$class
WFWidget::$errors
WFWidget::$formatter
WFWidget::$hasRestoredState
WFWidget::$hidden
WFWidget::$name
WFWidget::$value
WFWidget::$widgetLabel

Inherited from WFView

WFView::$children
WFView::$cssImports
WFView::$enabled
WFView::$id
WFView::$importInHead
WFView::$jsActions
WFView::$jsEvents
WFView::$jsImports
WFView::$originalOnEvent
WFView::$page
WFView::$parent
Methods
static method exposedProperties (line 101)
  • access: public
static void exposedProperties ()

Redefinition of:
WFWidget::exposedProperties()
Constructor __construct (line 90)

Constructor.

WFTabView __construct ( $id,  $page)
  • $id
  • $page

Redefinition of:
WFWidget::__construct()
Constructor.
activeTab (line 248)

Get the active tab.

  • return: The active tab object. Could be NULL if no active tab.
object WFTabContent activeTab ()
activeTabID (line 226)

Get the ID of the active tab.

  • return: The ID of the active tab. Could be NULL.
string activeTabID ()
activeTabLabel (line 237)

Get the label of the active tab.

  • return: The label of the active tab. Could be NULL.
string activeTabLabel ()
addTab (line 174)

Add a new tab to the WFTabView.

Modules must use this method for each tab that should be displayed in the interface.

  • throws: If a non-unique or invalid ID is passed.
void addTab (string $id, string $label, string $tpl)
  • string $id: A unique ID for the tab. Can only contain characters A-z0-9_.
  • string $label: The name of the tab, to be used as the tab's label.
  • string $tpl: The name of the .tpl file that should be used for this tab.
canPushValueBinding (line 122)
void canPushValueBinding ()

Redefinition of:
WFWidget::canPushValueBinding()
Does this widget use the "value" binding to WRITE data back to the bindings?
debugShowAllTabs (line 111)
void debugShowAllTabs ()
isActiveTab (line 259)

Is the passed tab object the active tab?

  • return: TRUE if the passed tab is the currently active tab, FALSE otherwise.
boolean isActiveTab (object WFTabContent $tab)
  • object WFTabContent $tab: The tab object to test.
removeTab (line 190)

Remove the passed tab from the TabView.

  • throws: Exception if $newActiveTabID is not a valid tab.
void removeTab (string $id, string $newActiveTabID)
  • string $id: The id of the tab to remove.
  • string $newActiveTabID: The id of the tab that should become the active tab if the removed tab happens to be active.
render (line 271)
void render ([ $blockContent = NULL])
  • $blockContent

Redefinition of:
WFView::render()
Render the view into HTML.
restoreState (line 130)

Restore the default tab ID to the one that was selected by the user.

void restoreState ()

Redefinition of:
WFWidget::restoreState()
Restore the UI state of this widget from the $_REQUEST data.
setActiveTabID (line 205)

Set the ID of the active tab.

  • throws: Exception if the passed ID does not yet exist.
void setActiveTabID (string $id)
  • string $id: The ID for the active tab. This tab MUST exist.
setDebugShowAllTabs (line 116)
void setDebugShowAllTabs ( $bool)
  • $bool
setDefaultTabID (line 159)

Set the default tab ID.

void setDefaultTabID (string $defaultTabID)
  • string $defaultTabID: The ID of the default tab. Note that the tab does not have to be created yet.
setDefaultTabIDIfNoDefault (line 146)

Set the default tab ID, but only if there is no default already set.

This is the call modules should use to set the default tab. Using this function will ensure that the default set by the module doesn't overwrite the currently selected tab being restored when a form is submitted.

void setDefaultTabIDIfNoDefault (string $defaultTabID)
  • string $defaultTabID: The ID of the default tab. Note that the tab does not have to be created yet.
tabs (line 216)

Get a list of all tabs.

  • return: An array of WFTabContent objects.
array tabs ()

Inherited Methods

Inherited From WFWidget

WFWidget::__construct()
WFWidget::addError()
WFWidget::addErrors()
WFWidget::bind()
WFWidget::bindingByName()
WFWidget::bindings()
WFWidget::canPushValueBinding()
WFWidget::errors()
WFWidget::exposedBindings()
WFWidget::exposedProperties()
WFWidget::formattedValue()
WFWidget::formatter()
WFWidget::hasRestoredState()
WFWidget::hidden()
WFWidget::name()
WFWidget::processBindingOptions()
WFWidget::propagateValueToBinding()
WFWidget::pullBindings()
WFWidget::pushBindings()
WFWidget::restoreState()
WFWidget::setFormatter()
WFWidget::setHidden()
WFWidget::setName()
WFWidget::setupExposedBindings()
WFWidget::setValue()
WFWidget::setWidgetLabel()
WFWidget::unbind()
WFWidget::value()
WFWidget::valueForBinding()
WFWidget::widgetLabel()

Inherited From WFView

WFView::__construct()
WFView::addChild()
WFView::allConfigFinishedLoading()
WFView::children()
WFView::cloneWithID()
WFView::enabled()
WFView::exposedProperties()
WFView::getForm()
WFView::getJSActions()
WFView::getListenerJS()
WFView::getListenerJSInScriptTag()
WFView::getOnEvent()
WFView::getWidgetDir()
WFView::getWidgetWWWDir()
WFView::id()
WFView::importCSS()
WFView::importJS()
WFView::jsEndHTML()
WFView::jsStartHTML()
WFView::page()
WFView::parent()
WFView::removeChild()
WFView::render()
WFView::setEnabled()
WFView::setId()
WFView::setJSonBlur()
WFView::setJSonClick()
WFView::setListener()
WFView::setOnEvent()
WFView::setParent()
WFView::yuiPath()

Inherited From WFObject

WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::setValuesForKeys()
WFObject::validatedSetValueForKey()
WFObject::validatedSetValueForKeyPath()
WFObject::validateObject()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForStaticKey()
WFObject::valueForStaticKeyPath()
WFObject::valueForTargetAndKeyPath()
WFObject::valueForUndefinedKey()
WFObject::valueForUndefinedStaticKey()
WFObject::valuesForKeyPaths()
WFObject::valuesForKeys()
WFObject::_valueForStaticKey()
WFObject::__toString()

Documentation generated on Thu, 14 May 2009 16:20:34 -0400 by phpDocumentor 1.4.2