Class TWizard

Description

Implements interfaces:

Class TWizard.

TWizard splits a large form and presents the user with a series of smaller forms to complete. TWizard is analogous to the installation wizard commonly used to install software in Windows.

The smaller forms are called wizard steps (TWizardStep, which can be accessed via WizardSteps. In template, wizard steps can be added into a wizard using the following syntax,

  1. <com:TWizard>
  2. <com:TWizardStep Title="step 1">
  3. content in step 1, may contain other controls
  4. </com:TWizardStep>
  5. <com:TWizardStep Title="step 2">
  6. content in step 2, may contain other controls
  7. </com:TWizardStep>
  8. </com:TWizard>

Each wizard step can be one of the following types:

  • Start : the first step in the wizard.
  • Step : the internal steps in the wizard.
  • Finish : the last step that allows user interaction.
  • Complete : the step that shows a summary to user (no interaction is allowed).
  • Auto : the step type is determined by wizard automatically.
At any time, only one step is visible to end-users, which can be obtained by ActiveStep. Its index in the step collection is given by ActiveStepIndex.

Wizard content can be customized in many ways.

The layout of a wizard consists of four parts: header, step content, navigation and side bar. Their content are affected by the following properties, respectively,

The style of these wizard layout components can be customized via the following style properties,

  • since: 3.0
  • version: $Id: TWizard.php 1574 2006-12-15 16:09:53Z xue $
  • author: Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/WebControls/TWizard.php (line 83)

TComponent
   |
   --TApplicationComponent
      |
      --TControl
         |
         --TWebControl
            |
            --TWizard
Class Constant Summary
 CMD_CANCEL = 'Cancel'
 CMD_COMPLETE = 'Complete'
 CMD_MOVETO = 'MoveTo'
 CMD_NEXT = 'NextStep'
 CMD_PREVIOUS = 'PreviousStep'
 ID_SIDEBAR_BUTTON = 'SideBarButton'
 ID_SIDEBAR_LIST = 'SideBarList'
 ST_AUTO = 'Auto'
 ST_COMPLETE = 'Complete'
 ST_FINISH = 'Finish'
 ST_START = 'Start'
 ST_STEP = 'Step'
Method Summary
void addParsedObject (mixed $object)
boolean allowNavigationToStep (integer $index)
void bubbleEvent (mixed $sender, TEventParameter $param)
void createHeader ()
void createSideBar ()
void dataListItemCommand (mixed $sender, TDataListCommandEventParameter $param)
void dataListItemDataBound (mixed $sender, TDataListItemEventParameter $param)
integer getActiveStepIndex ()
string getHeaderText ()
void getPreviousStepIndex (boolean $popStack)
boolean getShowCancelButton ()
boolean getShowSideBar ()
string getTagName ()
boolean getUseDefaultLayout ()
void onInit (TEventParameter $param)
void render (THtmlWriter $writer)
void reset ()
void saveState ()
void setActiveStep (TWizardStep $step)
void setActiveStepIndex (integer $value)
void setCancelDestinationUrl (string $value)
void setFinishDestinationUrl (string $value)
void setHeaderTemplate (ITemplate $value)
void setHeaderText (string $value)
void setShowCancelButton (boolean $value)
void setShowSideBar (boolean $value)
void setSideBarTemplate (ITemplate $value)
void setUseDefaultLayout (boolean $value)
Methods
addedWizardStep (line 745)

Adds a wizard step to the multiview.

This method should only be used by control developers. It is invoked when a step is added into the step collection of the wizard.

  • access: public
void addedWizardStep (TWizardStep $step)
  • TWizardStep $step: wizard step to be added into multiview.
addParsedObject (line 194)

Adds TWizardStep objects into step collection.

This method overrides the parent implementation and is invoked when template is being instantiated.

  • access: public
void addParsedObject (mixed $object)
  • mixed $object: object instantiated in template

Redefinition of:
TControl::addParsedObject()
Adds the object instantiated on a template to the child control collection.
allowNavigationToPreviousStep (line 1313)
  • return: whether navigation to the previous step is allowed
  • access: protected
boolean allowNavigationToPreviousStep ()
allowNavigationToStep (line 1325)
  • return: whether navigation to the specified step is allowed
  • access: protected
boolean allowNavigationToStep (integer $index)
  • integer $index: index of the step
applyControlProperties (line 837)

Applies various properties to the components of wizard

  • access: protected
void applyControlProperties ()
applyHeaderProperties (line 848)

Applies properties to the wizard header

  • access: protected
void applyHeaderProperties ()
applyNavigationProperties (line 895)

Apply properties to various navigation panels.

  • access: protected
void applyNavigationProperties ()
applySideBarProperties (line 862)

Applies properties to the wizard sidebar

  • access: protected
void applySideBarProperties ()
applyStepContentProperties (line 886)

Applies properties to the wizard step content

  • access: protected
void applyStepContentProperties ()
bubbleEvent (line 1341)

Handles bubbled events.

This method mainly translate certain command events into wizard-specific events.

  • access: public
  • throws: TInvalidDataValueException if a navigation command is associated with an invalid parameter
void bubbleEvent (mixed $sender, TEventParameter $param)
  • mixed $sender: sender of the original command event
  • TEventParameter $param: event parameter

Redefinition of:
TControl::bubbleEvent()
This method responds to a bubbled event.
createChildControls (line 1066)

Creates child controls within the wizard

  • access: public
void createChildControls ()

Redefinition of:
TControl::createChildControls()
Creates child controls.
createFinishNavigation (line 1253)

Creates finish navigation panel.

  • access: protected
void createFinishNavigation ()
createHeader (line 1079)

Creates the wizard header.

  • access: protected
void createHeader ()
createNavigation (line 1204)

Creates navigation panel.

  • access: protected
void createNavigation ()
createSideBar (line 1092)

Creates the wizard side bar

  • access: protected
void createSideBar ()
createStartNavigation (line 1229)

Creates start navigation panel.

  • access: protected
void createStartNavigation ()
createStepContent (line 1186)

Creates wizard step content.

  • access: protected
void createStepContent ()
createStepNavigation (line 1241)

Creates step navigation panel.

  • access: protected
void createStepNavigation ()
dataListItemCommand (line 1125)

Event handler for sidebar datalist's OnItemCommand event.

This method is used internally by wizard. It mainly sets the active step index according to the button clicked in the sidebar.

  • access: public
void dataListItemCommand (mixed $sender, TDataListCommandEventParameter $param)
dataListItemDataBound (line 1161)

Event handler for sidebar datalist's OnItemDataBound event.

This method is used internally by wizard. It mainly configures the buttons in the sidebar datalist.

  • access: public
void dataListItemDataBound (mixed $sender, TDataListItemEventParameter $param)
getActiveStep (line 203)
  • return: the currently active wizard step
  • access: public
TWizardStep getActiveStep ()
getActiveStepIndex (line 222)
  • return: the zero-based index of the active wizard step
  • access: public
integer getActiveStepIndex ()
getCancelButtonStyle (line 524)
  • return: the style for the cancel button
  • access: public
TWizardNavigationButtonStyle getCancelButtonStyle ()
getCancelDestinationUrl (line 394)
  • return: the URL that the browser will be redirected to if the cancel button in the wizard is clicked. Defaults to ''.
  • access: public
string getCancelDestinationUrl ()
getFinishCompleteButtonStyle (line 496)
  • return: the style for the complete button in the finish wizard step.
  • access: public
TWizardNavigationButtonStyle getFinishCompleteButtonStyle ()
getFinishDestinationUrl (line 412)
  • return: the URL that the browser will be redirected to if the wizard finishes. Defaults to ''.
  • access: public
string getFinishDestinationUrl ()
getFinishNavigation (line 648)
  • return: container of the finish navigation
  • access: public
TWizardNavigationContainer getFinishNavigation ()
getFinishNavigationTemplate (line 326)
  • return: navigation template for the finish step. Defaults to null.
  • access: public
ITemplate getFinishNavigationTemplate ()
getFinishPreviousButtonStyle (line 510)
  • return: the style for the previous button in the start wizard step.
  • access: public
TWizardNavigationButtonStyle getFinishPreviousButtonStyle ()
getHeader (line 608)
  • return: container of the wizard header
  • access: public
TPanel getHeader ()
getHeaderStyle (line 551)
  • return: the style for the header.
  • access: public
TPanelStyle getHeaderStyle ()
getHeaderTemplate (line 343)
  • return: template for wizard header. Defaults to null.
  • access: public
ITemplate getHeaderTemplate ()
getHeaderText (line 377)
  • return: header text. Defaults to ''.
  • access: public
string getHeaderText ()
getHistory (line 1008)
  • return: history containing step indexes that were navigated before
  • access: protected
TStack getHistory ()
getMultiView (line 727)

Returns the multiview that holds the wizard steps.

This method should only be used by control developers.

  • return: the multiview holding wizard steps
  • access: public
TMultiView getMultiView ()
getNavigationButtonStyle (line 441)
  • return: the style common for all navigation buttons.
  • access: public
TStyle getNavigationButtonStyle ()
getNavigationStyle (line 577)
  • return: the style for the navigation panel.
  • access: public
TPanelStyle getNavigationStyle ()
getPreviousStepIndex (line 1281)

Determines the index of the previous step based on history.

  • access: protected
void getPreviousStepIndex (boolean $popStack)
  • boolean $popStack: whether the first item in the history stack should be popped up after calling this method.
getShowCancelButton (line 259)
  • return: whether to display a cancel button in each wizard step. Defaults to false.
  • access: public
boolean getShowCancelButton ()
getShowSideBar (line 275)
  • return: whether to display a side bar that contains links to wizard steps. Defaults to true.
  • access: public
boolean getShowSideBar ()
getSideBar (line 624)
  • return: container of the wizard side bar
  • access: public
TPanel getSideBar ()
getSideBarButtonStyle (line 428)
  • return: the style for the buttons displayed in the side bar.
  • access: public
TStyle getSideBarButtonStyle ()
getSideBarStyle (line 538)
  • return: the style for the side bar.
  • access: public
TPanelStyle getSideBarStyle ()
getSideBarTemplate (line 360)
  • return: template for the side bar. Defaults to null.
  • access: public
ITemplate getSideBarTemplate ()
getStartNavigation (line 632)
  • return: container of the start navigation
  • access: public
TWizardNavigationContainer getStartNavigation ()
getStartNavigationTemplate (line 292)
  • return: navigation template for the start step. Defaults to null.
  • access: public
ITemplate getStartNavigationTemplate ()
getStartNextButtonStyle (line 454)
  • return: the style for the next button in the start wizard step.
  • access: public
TWizardNavigationButtonStyle getStartNextButtonStyle ()
getStepContent (line 616)
  • return: container of the wizard step content
  • access: public
TPanel getStepContent ()
getStepNavigation (line 640)
  • return: container of the step navigation
  • access: public
TWizardNavigationContainer getStepNavigation ()
getStepNavigationTemplate (line 309)
  • return: navigation template for internal steps. Defaults to null.
  • access: public
ITemplate getStepNavigationTemplate ()
getStepNextButtonStyle (line 468)
  • return: the style for the next button in each internal wizard step.
  • access: public
TWizardNavigationButtonStyle getStepNextButtonStyle ()
getStepPreviousButtonStyle (line 482)
  • return: the style for the previous button in the start wizard step.
  • access: public
TWizardNavigationButtonStyle getStepPreviousButtonStyle ()
getStepStyle (line 564)
  • return: the style for each internal wizard step.
  • access: public
TPanelStyle getStepStyle ()
getStepType (line 1023)

Determines the type of the specified wizard step.

  • return: type of the step
  • access: protected
TWizardStepType getStepType (TWizardStep $wizardStep)
getTagName (line 183)
  • return: tag name for the wizard
  • access: protected
string getTagName ()

Redefinition of:
TWebControl::getTagName()
Returns the tag name used for this control.
getUseDefaultLayout (line 590)
  • return: whether to use default layout to arrange side bar and the rest wizard components. Defaults to true.
  • access: public
boolean getUseDefaultLayout ()
getWizardSteps (line 249)
  • return: collection of wizard steps
  • access: public
TWizardStepCollection getWizardSteps ()
onActiveStepChanged (line 659)

Raises OnActiveStepChanged event.

This event is raised when the current visible step is changed in the wizard.

  • access: public
void onActiveStepChanged (TEventParameter $param)
onCancelButtonClick (line 670)

Raises OnCancelButtonClick event.

This event is raised when a cancel navigation button is clicked in the current active step.

  • access: public
void onCancelButtonClick (TEventParameter $param)
onCompleteButtonClick (line 683)

Raises OnCompleteButtonClick event.

This event is raised when a finish navigation button is clicked in the current active step.

  • access: public
void onCompleteButtonClick (TWizardNavigationEventParameter $param)
onInit (line 770)

Creates the child controls of the wizard.

This method overrides the parent implementation.

  • access: public
void onInit (TEventParameter $param)

Redefinition of:
TControl::onInit()
This method is invoked when the control enters 'OnInit' stage.
onNextButtonClick (line 696)

Raises OnNextButtonClick event.

This event is raised when a next navigation button is clicked in the current active step.

  • access: public
void onNextButtonClick (TWizardNavigationEventParameter $param)
onPreviousButtonClick (line 707)

Raises OnPreviousButtonClick event.

This event is raised when a previous navigation button is clicked in the current active step.

  • access: public
void onPreviousButtonClick (TWizardNavigationEventParameter $param)
onSideBarButtonClick (line 717)

Raises OnSideBarButtonClick event.

This event is raised when a link button in the side bar is clicked.

  • access: public
void onSideBarButtonClick (TWizardNavigationEventParameter $param)
removedWizardStep (line 759)

Removes a wizard step from the multiview.

This method should only be used by control developers. It is invoked when a step is removed from the step collection of the wizard.

  • access: public
void removedWizardStep (TWizardStep $step)
  • TWizardStep $step: wizard step to be removed from multiview.
render (line 803)

Renders the wizard.

  • access: public
void render (THtmlWriter $writer)

Redefinition of:
TWebControl::render()
Renders the control.
requiresControlsRecreation (line 793)

Indicates the wizard needs to recreate all child controls.

  • access: protected
void requiresControlsRecreation ()
reset (line 1050)

Clears up everything within the wizard.

  • access: protected
void reset ()
saveState (line 782)

Saves the current active step index into history.

This method is invoked by the framework when the control state is being saved.

  • access: public
void saveState ()

Redefinition of:
TControl::saveState()
This method is invoked when control state is to be saved.
setActiveStep (line 212)
  • access: public
  • throws: TInvalidOperationException if the step is not in the wizard step collection
void setActiveStep (TWizardStep $step)
setActiveStepIndex (line 230)
  • access: public
void setActiveStepIndex (integer $value)
  • integer $value: the zero-based index of the wizard step to be activated
setCancelDestinationUrl (line 403)
  • access: public
void setCancelDestinationUrl (string $value)
  • string $value: the URL that the browser will be redirected to if the cancel button in the wizard is clicked.
setFinishDestinationUrl (line 420)
  • access: public
void setFinishDestinationUrl (string $value)
  • string $value: the URL that the browser will be redirected to if the wizard finishes.
setFinishNavigationTemplate (line 334)
  • access: public
void setFinishNavigationTemplate (ITemplate $value)
  • ITemplate $value: navigation template for the finish step.
setHeaderTemplate (line 351)
  • access: public
void setHeaderTemplate (ITemplate $value)
  • ITemplate $value: template for wizard header.
setHeaderText (line 385)
  • access: public
void setHeaderText (string $value)
  • string $value: header text.
setShowCancelButton (line 267)
  • access: public
void setShowCancelButton (boolean $value)
  • boolean $value: whether to display a cancel button in each wizard step.
setShowSideBar (line 283)
  • access: public
void setShowSideBar (boolean $value)
  • boolean $value: whether to display a side bar that contains links to wizard steps.
setSideBarTemplate (line 368)
  • access: public
void setSideBarTemplate (ITemplate $value)
  • ITemplate $value: template for the side bar.
setStartNavigationTemplate (line 300)
  • access: public
void setStartNavigationTemplate (ITemplate $value)
  • ITemplate $value: navigation template for the start step.
setStepNavigationTemplate (line 317)
  • access: public
void setStepNavigationTemplate (ITemplate $value)
  • ITemplate $value: navigation template for internal steps.
setUseDefaultLayout (line 600)
  • access: public
void setUseDefaultLayout (boolean $value)
  • boolean $value: whether to use default layout to arrange side bar and the rest wizard components. If true, an HTML table will be used which places the side bar in the left cell while the rest components in the right cell.
wizardStepsChanged (line 1266)

Updates the sidebar datalist if any.

This method is invoked when any wizard step is changed.

  • access: public
void wizardStepsChanged ()

Inherited Methods

Inherited From TWebControl

TWebControl::addAttributesToRender()
TWebControl::copyBaseAttributes()
TWebControl::createStyle()
TWebControl::getAccessKey()
TWebControl::getBackColor()
TWebControl::getBorderColor()
TWebControl::getBorderStyle()
TWebControl::getBorderWidth()
TWebControl::getCssClass()
TWebControl::getFont()
TWebControl::getForeColor()
TWebControl::getHasStyle()
TWebControl::getHeight()
TWebControl::getStyle()
TWebControl::getTabIndex()
TWebControl::getTagName()
TWebControl::getToolTip()
TWebControl::getWidth()
TWebControl::render()
TWebControl::renderBeginTag()
TWebControl::renderContents()
TWebControl::renderEndTag()
TWebControl::setAccessKey()
TWebControl::setBackColor()
TWebControl::setBorderColor()
TWebControl::setBorderStyle()
TWebControl::setBorderWidth()
TWebControl::setCssClass()
TWebControl::setForeColor()
TWebControl::setHeight()
TWebControl::setStyle()
TWebControl::setTabIndex()
TWebControl::setToolTip()
TWebControl::setWidth()

Inherited From TControl

TControl::__construct()
TControl::addedControl()
TControl::addParsedObject()
TControl::addToPostDataLoader()
TControl::applyStyleSheetSkin()
TControl::autoBindProperty()
TControl::autoDataBindProperties()
TControl::bindProperty()
TControl::broadcastEvent()
TControl::bubbleEvent()
TControl::clearChildState()
TControl::clearControlState()
TControl::clearNamingContainer()
TControl::clearViewState()
TControl::createChildControls()
TControl::createControlCollection()
TControl::dataBind()
TControl::dataBindChildren()
TControl::dataBindProperties()
TControl::ensureChildControls()
TControl::findControl()
TControl::findControlsByID()
TControl::findControlsByType()
TControl::focus()
TControl::getAdapter()
TControl::getAllowChildControls()
TControl::getAttribute()
TControl::getAttributes()
TControl::getChildControlsCreated()
TControl::getClientID()
TControl::getControls()
TControl::getControlStage()
TControl::getControlState()
TControl::getCustomData()
TControl::getEnabled()
TControl::getEnableTheming()
TControl::getEnableViewState()
TControl::getHasAdapter()
TControl::getHasAttributes()
TControl::getHasChildInitialized()
TControl::getHasControls()
TControl::getHasInitialized()
TControl::getHasLoaded()
TControl::getHasLoadedPostData()
TControl::getHasPreRendered()
TControl::getID()
TControl::getNamingContainer()
TControl::getPage()
TControl::getParent()
TControl::getRegisteredObject()
TControl::getSkinID()
TControl::getSourceTemplateControl()
TControl::getTemplateControl()
TControl::getUniqueID()
TControl::getViewState()
TControl::getVisible()
TControl::hasAttribute()
TControl::initRecursive()
TControl::isDescendentOf()
TControl::isObjectRegistered()
TControl::loadRecursive()
TControl::loadState()
TControl::loadStateRecursive()
TControl::onDataBinding()
TControl::onInit()
TControl::onLoad()
TControl::onPreRender()
TControl::onUnload()
TControl::preRenderRecursive()
TControl::raiseBubbleEvent()
TControl::registerObject()
TControl::removeAttribute()
TControl::removedControl()
TControl::render()
TControl::renderChildren()
TControl::renderControl()
TControl::saveState()
TControl::saveStateRecursive()
TControl::setAdapter()
TControl::setAttribute()
TControl::setChildControlsCreated()
TControl::setControlStage()
TControl::setControlState()
TControl::setCustomData()
TControl::setEnabled()
TControl::setEnableTheming()
TControl::setEnableViewState()
TControl::setID()
TControl::setPage()
TControl::setSkinID()
TControl::setTemplateControl()
TControl::setViewState()
TControl::setVisible()
TControl::traverseChildControls()
TControl::unbindProperty()
TControl::unloadRecursive()
TControl::unregisterObject()
TControl::__get()

Inherited From TApplicationComponent

TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()

Inherited From TComponent

TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Class Constants
CMD_CANCEL = 'Cancel' (line 99)
CMD_COMPLETE = 'Complete' (line 100)
CMD_MOVETO = 'MoveTo' (line 101)
CMD_NEXT = 'NextStep' (line 98)
CMD_PREVIOUS = 'PreviousStep' (line 97)

Navigation commands.

ID_SIDEBAR_BUTTON = 'SideBarButton' (line 105)

Side bar button ID

ID_SIDEBAR_LIST = 'SideBarList' (line 109)

Side bar data list

ST_AUTO = 'Auto' (line 89)

Wizard step types.

  • deprecated: deprecated since version 3.0.4 (use TWizardStepType constants instead)
ST_COMPLETE = 'Complete' (line 93)
ST_FINISH = 'Finish' (line 92)
ST_START = 'Start' (line 90)
ST_STEP = 'Step' (line 91)

Inherited Constants

Inherited from TControl

TControl::AUTOMATIC_ID_PREFIX
TControl::CLIENT_ID_SEPARATOR
TControl::CS_CHILD_INITIALIZED
TControl::CS_CONSTRUCTED
TControl::CS_INITIALIZED
TControl::CS_LOADED
TControl::CS_PRERENDERED
TControl::CS_STATE_LOADED
TControl::ID_FORMAT
TControl::ID_SEPARATOR
TControl::IS_CHILD_CREATED
TControl::IS_CREATING_CHILD
TControl::IS_DISABLE_THEMING
TControl::IS_DISABLE_VIEWSTATE
TControl::IS_ID_SET
TControl::IS_SKIN_APPLIED
TControl::IS_STYLESHEET_APPLIED
TControl::RF_ADAPTER
TControl::RF_AUTO_BINDINGS
TControl::RF_CHILD_STATE
TControl::RF_CONTROLS
TControl::RF_CONTROLSTATE
TControl::RF_DATA_BINDINGS
TControl::RF_EVENTS
TControl::RF_NAMED_CONTROLS
TControl::RF_NAMED_CONTROLS_ID
TControl::RF_NAMED_OBJECTS
TControl::RF_SKIN_ID

Documentation generated on Sun, 14 Jan 2007 21:45:06 -0500 by phpDocumentor 1.3.0RC4