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 2427 2008-04-17 17:18:25Z tof $
  • author: Qiang Xue <qiang.xue@gmail.com>

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

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 746)

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 195)

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 1314)
  • return: whether navigation to the previous step is allowed
  • access: protected
boolean allowNavigationToPreviousStep ()
allowNavigationToStep (line 1326)
  • return: whether navigation to the specified step is allowed
  • access: protected
boolean allowNavigationToStep (integer $index)
  • integer $index: index of the step
applyControlProperties (line 838)

Applies various properties to the components of wizard

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

Applies properties to the wizard header

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

Apply properties to various navigation panels.

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

Applies properties to the wizard sidebar

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

Applies properties to the wizard step content

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

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 1067)

Creates child controls within the wizard

  • access: public
void createChildControls ()

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

Creates finish navigation panel.

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

Creates the wizard header.

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

Creates navigation panel.

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

Creates the wizard side bar

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

Creates start navigation panel.

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

Creates wizard step content.

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

Creates step navigation panel.

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

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 1162)

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 204)
  • return: the currently active wizard step
  • access: public
TWizardStep getActiveStep ()
getActiveStepIndex (line 223)
  • return: the zero-based index of the active wizard step
  • access: public
integer getActiveStepIndex ()
getCancelButtonStyle (line 525)
  • return: the style for the cancel button
  • access: public
TWizardNavigationButtonStyle getCancelButtonStyle ()
getCancelDestinationUrl (line 395)
  • 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 497)
  • return: the style for the complete button in the finish wizard step.
  • access: public
TWizardNavigationButtonStyle getFinishCompleteButtonStyle ()
getFinishDestinationUrl (line 413)
  • return: the URL that the browser will be redirected to if the wizard finishes. Defaults to ''.
  • access: public
string getFinishDestinationUrl ()
getFinishNavigation (line 649)
  • return: container of the finish navigation
  • access: public
TWizardNavigationContainer getFinishNavigation ()
getFinishNavigationTemplate (line 327)
  • return: navigation template for the finish step. Defaults to null.
  • access: public
ITemplate getFinishNavigationTemplate ()
getFinishPreviousButtonStyle (line 511)
  • return: the style for the previous button in the start wizard step.
  • access: public
TWizardNavigationButtonStyle getFinishPreviousButtonStyle ()
getHeader (line 609)
  • return: container of the wizard header
  • access: public
TPanel getHeader ()
getHeaderStyle (line 552)
  • return: the style for the header.
  • access: public
TPanelStyle getHeaderStyle ()
getHeaderTemplate (line 344)
  • return: template for wizard header. Defaults to null.
  • access: public
ITemplate getHeaderTemplate ()
getHeaderText (line 378)
  • return: header text. Defaults to ''.
  • access: public
string getHeaderText ()
getHistory (line 1009)
  • return: history containing step indexes that were navigated before
  • access: protected
TStack getHistory ()
getMultiView (line 728)

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 442)
  • return: the style common for all navigation buttons.
  • access: public
TStyle getNavigationButtonStyle ()
getNavigationStyle (line 578)
  • return: the style for the navigation panel.
  • access: public
TPanelStyle getNavigationStyle ()
getPreviousStepIndex (line 1282)

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 260)
  • return: whether to display a cancel button in each wizard step. Defaults to false.
  • access: public
boolean getShowCancelButton ()
getShowSideBar (line 276)
  • return: whether to display a side bar that contains links to wizard steps. Defaults to true.
  • access: public
boolean getShowSideBar ()
getSideBar (line 625)
  • return: container of the wizard side bar
  • access: public
TPanel getSideBar ()
getSideBarButtonStyle (line 429)
  • return: the style for the buttons displayed in the side bar.
  • access: public
TStyle getSideBarButtonStyle ()
getSideBarStyle (line 539)
  • return: the style for the side bar.
  • access: public
TPanelStyle getSideBarStyle ()
getSideBarTemplate (line 361)
  • return: template for the side bar. Defaults to null.
  • access: public
ITemplate getSideBarTemplate ()
getStartNavigation (line 633)
  • return: container of the start navigation
  • access: public
TWizardNavigationContainer getStartNavigation ()
getStartNavigationTemplate (line 293)
  • return: navigation template for the start step. Defaults to null.
  • access: public
ITemplate getStartNavigationTemplate ()
getStartNextButtonStyle (line 455)
  • return: the style for the next button in the start wizard step.
  • access: public
TWizardNavigationButtonStyle getStartNextButtonStyle ()
getStepContent (line 617)
  • return: container of the wizard step content
  • access: public
TPanel getStepContent ()
getStepNavigation (line 641)
  • return: container of the step navigation
  • access: public
TWizardNavigationContainer getStepNavigation ()
getStepNavigationTemplate (line 310)
  • return: navigation template for internal steps. Defaults to null.
  • access: public
ITemplate getStepNavigationTemplate ()
getStepNextButtonStyle (line 469)
  • return: the style for the next button in each internal wizard step.
  • access: public
TWizardNavigationButtonStyle getStepNextButtonStyle ()
getStepPreviousButtonStyle (line 483)
  • return: the style for the previous button in the start wizard step.
  • access: public
TWizardNavigationButtonStyle getStepPreviousButtonStyle ()
getStepStyle (line 565)
  • return: the style for each internal wizard step.
  • access: public
TPanelStyle getStepStyle ()
getStepType (line 1024)

Determines the type of the specified wizard step.

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

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

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 671)

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 684)

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 771)

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 697)

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 708)

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 718)

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 760)

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 804)

Renders the wizard.

  • access: public
void render (THtmlWriter $writer)

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

Indicates the wizard needs to recreate all child controls.

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

Clears up everything within the wizard.

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

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 213)
  • access: public
  • throws: TInvalidOperationException if the step is not in the wizard step collection
void setActiveStep (TWizardStep $step)
setActiveStepIndex (line 231)
  • access: public
void setActiveStepIndex (integer $value)
  • integer $value: the zero-based index of the wizard step to be activated
setCancelDestinationUrl (line 404)
  • 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 421)
  • access: public
void setFinishDestinationUrl (string $value)
  • string $value: the URL that the browser will be redirected to if the wizard finishes.
setFinishNavigationTemplate (line 335)
  • access: public
void setFinishNavigationTemplate (ITemplate $value)
  • ITemplate $value: navigation template for the finish step.
setHeaderTemplate (line 352)
  • access: public
void setHeaderTemplate (ITemplate $value)
  • ITemplate $value: template for wizard header.
setHeaderText (line 386)
  • access: public
void setHeaderText (string $value)
  • string $value: header text.
setShowCancelButton (line 268)
  • access: public
void setShowCancelButton (boolean $value)
  • boolean $value: whether to display a cancel button in each wizard step.
setShowSideBar (line 284)
  • access: public
void setShowSideBar (boolean $value)
  • boolean $value: whether to display a side bar that contains links to wizard steps.
setSideBarTemplate (line 369)
  • access: public
void setSideBarTemplate (ITemplate $value)
  • ITemplate $value: template for the side bar.
setStartNavigationTemplate (line 301)
  • access: public
void setStartNavigationTemplate (ITemplate $value)
  • ITemplate $value: navigation template for the start step.
setStepNavigationTemplate (line 318)
  • access: public
void setStepNavigationTemplate (ITemplate $value)
  • ITemplate $value: navigation template for internal steps.
setUseDefaultLayout (line 601)
  • 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 1267)

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::clearStyle()
TWebControl::copyBaseAttributes()
TWebControl::createStyle()
TWebControl::getAccessKey()
TWebControl::getBackColor()
TWebControl::getBorderColor()
TWebControl::getBorderStyle()
TWebControl::getBorderWidth()
TWebControl::getCssClass()
TWebControl::getDisplay()
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::setDisplay()
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::convertUniqueIdToClientId()
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::trackViewState()
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 100)
CMD_COMPLETE = 'Complete' (line 101)
CMD_MOVETO = 'MoveTo' (line 102)
CMD_NEXT = 'NextStep' (line 99)
CMD_PREVIOUS = 'PreviousStep' (line 98)

Navigation commands.

ID_SIDEBAR_BUTTON = 'SideBarButton' (line 106)

Side bar button ID

ID_SIDEBAR_LIST = 'SideBarList' (line 110)

Side bar data list

ST_AUTO = 'Auto' (line 90)

Wizard step types.

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

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 Mon, 21 Apr 2008 11:36:46 -0400 by phpDocumentor 1.3.0RC4