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,

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 getStepType (TWizardStep $wizardStep)
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 739)

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

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()
Processes an object that is created during parsing template.
allowNavigationToPreviousStep (line 1308)
  • return: whether navigation to the previous step is allowed
  • access: protected
boolean allowNavigationToPreviousStep ()
allowNavigationToStep (line 1320)
  • return: whether navigation to the specified step is allowed
  • access: protected
boolean allowNavigationToStep (integer $index)
  • integer $index: index of the step
applyControlProperties (line 833)

Applies various properties to the components of wizard

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

Applies properties to the wizard header

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

Apply properties to various navigation panels.

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

Applies properties to the wizard sidebar

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

Applies properties to the wizard step content

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

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

Creates child controls within the wizard

  • access: public
void createChildControls ()

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

Creates finish navigation panel.

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

Creates the wizard header.

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

Creates navigation panel.

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

Creates the wizard side bar

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

Creates start navigation panel.

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

Creates wizard step content.

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

Creates step navigation panel.

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

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

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 199)
  • return: the currently active wizard step
  • access: public
TWizardStep getActiveStep ()
getActiveStepIndex (line 218)
  • return: the zero-based index of the active wizard step
  • access: public
integer getActiveStepIndex ()
getCancelButtonStyle (line 520)
  • return: the style for the cancel button
  • access: public
TWizardNavigationButtonStyle getCancelButtonStyle ()
getCancelDestinationUrl (line 390)
  • 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 492)
  • return: the style for the complete button in the finish wizard step.
  • access: public
TWizardNavigationButtonStyle getFinishCompleteButtonStyle ()
getFinishDestinationUrl (line 408)
  • return: the URL that the browser will be redirected to if the wizard finishes. Defaults to ''.
  • access: public
string getFinishDestinationUrl ()
getFinishNavigation (line 644)
  • return: container of the finish navigation
  • access: public
TWizardNavigationContainer getFinishNavigation ()
getFinishNavigationTemplate (line 322)
  • return: navigation template for the finish step. Defaults to null.
  • access: public
ITemplate getFinishNavigationTemplate ()
getFinishPreviousButtonStyle (line 506)
  • return: the style for the previous button in the start wizard step.
  • access: public
TWizardNavigationButtonStyle getFinishPreviousButtonStyle ()
getHeader (line 604)
  • return: container of the wizard header
  • access: public
TPanel getHeader ()
getHeaderStyle (line 547)
  • return: the style for the header.
  • access: public
TPanelStyle getHeaderStyle ()
getHeaderTemplate (line 339)
  • return: template for wizard header. Defaults to null.
  • access: public
ITemplate getHeaderTemplate ()
getHeaderText (line 373)
  • return: header text. Defaults to ''.
  • access: public
string getHeaderText ()
getHistory (line 1004)
  • return: history containing step indexes that were navigated before
  • access: protected
TStack getHistory ()
getMultiView (line 721)
  • return: the multiview holding wizard steps
  • access: protected
TMultiView getMultiView ()
getNavigationButtonStyle (line 437)
  • return: the style common for all navigation buttons.
  • access: public
TStyle getNavigationButtonStyle ()
getNavigationStyle (line 573)
  • return: the style for the navigation panel.
  • access: public
TPanelStyle getNavigationStyle ()
getPreviousStepIndex (line 1276)

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 255)
  • return: whether to display a cancel button in each wizard step. Defaults to false.
  • access: public
boolean getShowCancelButton ()
getShowSideBar (line 271)
  • return: whether to display a side bar that contains links to wizard steps. Defaults to true.
  • access: public
boolean getShowSideBar ()
getSideBar (line 620)
  • return: container of the wizard side bar
  • access: public
TPanel getSideBar ()
getSideBarButtonStyle (line 424)
  • return: the style for the buttons displayed in the side bar.
  • access: public
TStyle getSideBarButtonStyle ()
getSideBarStyle (line 534)
  • return: the style for the side bar.
  • access: public
TPanelStyle getSideBarStyle ()
getSideBarTemplate (line 356)
  • return: template for the side bar. Defaults to null.
  • access: public
ITemplate getSideBarTemplate ()
getStartNavigation (line 628)
  • return: container of the start navigation
  • access: public
TWizardNavigationContainer getStartNavigation ()
getStartNavigationTemplate (line 288)
  • return: navigation template for the start step. Defaults to null.
  • access: public
ITemplate getStartNavigationTemplate ()
getStartNextButtonStyle (line 450)
  • return: the style for the next button in the start wizard step.
  • access: public
TWizardNavigationButtonStyle getStartNextButtonStyle ()
getStepContent (line 612)
  • return: container of the wizard step content
  • access: public
TPanel getStepContent ()
getStepNavigation (line 636)
  • return: container of the step navigation
  • access: public
TWizardNavigationContainer getStepNavigation ()
getStepNavigationTemplate (line 305)
  • return: navigation template for internal steps. Defaults to null.
  • access: public
ITemplate getStepNavigationTemplate ()
getStepNextButtonStyle (line 464)
  • return: the style for the next button in each internal wizard step.
  • access: public
TWizardNavigationButtonStyle getStepNextButtonStyle ()
getStepPreviousButtonStyle (line 478)
  • return: the style for the previous button in the start wizard step.
  • access: public
TWizardNavigationButtonStyle getStepPreviousButtonStyle ()
getStepStyle (line 560)
  • return: the style for each internal wizard step.
  • access: public
TPanelStyle getStepStyle ()
getStepType (line 1019)

Determines the type of the specified wizard step.

  • return: type of the step, 'Finish', 'Start', 'Step'.
  • access: protected
string getStepType (TWizardStep $wizardStep)
getTagName (line 179)
  • return: tag name for the wizard
  • access: protected
string getTagName ()

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

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

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

Raises OnCompleteButtonClick event.

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

  • access: public
void onCompleteButtonClick (TEventParameter $param)
onInit (line 766)

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

Raises OnNextButtonClick event.

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

  • access: public
void onNextButtonClick (TEventParameter $param)
onPreviousButtonClick (line 703)

Raises OnPreviousButtonClick event.

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

  • access: public
void onPreviousButtonClick (TEventParameter $param)
onSideBarButtonClick (line 713)

Raises OnSideBarButtonClick event.

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

  • access: public
void onSideBarButtonClick (TEventParameter $param)
removedWizardStep (line 754)

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

Renders the wizard.

  • access: public
void render (THtmlWriter $writer)

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

Indicates the wizard needs to recreate all child controls.

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

Clears up everything within the wizard.

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

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 208)
  • access: public
  • throws: TInvalidOperationException if the step is not in the wizard step collection
void setActiveStep (TWizardStep $step)
setActiveStepIndex (line 226)
  • access: public
void setActiveStepIndex (integer $value)
  • integer $value: the zero-based index of the wizard step to be activated
setCancelDestinationUrl (line 399)
  • 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 416)
  • access: public
void setFinishDestinationUrl (string $value)
  • string $value: the URL that the browser will be redirected to if the wizard finishes.
setFinishNavigationTemplate (line 330)
  • access: public
void setFinishNavigationTemplate (ITemplate $value)
  • ITemplate $value: navigation template for the finish step.
setHeaderTemplate (line 347)
  • access: public
void setHeaderTemplate (ITemplate $value)
  • ITemplate $value: template for wizard header.
setHeaderText (line 381)
  • access: public
void setHeaderText (string $value)
  • string $value: header text.
setShowCancelButton (line 263)
  • access: public
void setShowCancelButton (boolean $value)
  • boolean $value: whether to display a cancel button in each wizard step.
setShowSideBar (line 279)
  • access: public
void setShowSideBar (boolean $value)
  • boolean $value: whether to display a side bar that contains links to wizard steps.
setSideBarTemplate (line 364)
  • access: public
void setSideBarTemplate (ITemplate $value)
  • ITemplate $value: template for the side bar.
setStartNavigationTemplate (line 296)
  • access: public
void setStartNavigationTemplate (ITemplate $value)
  • ITemplate $value: navigation template for the start step.
setStepNavigationTemplate (line 313)
  • access: public
void setStepNavigationTemplate (ITemplate $value)
  • ITemplate $value: navigation template for internal steps.
setUseDefaultLayout (line 596)
  • 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 1261)

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::applyStyleSheetSkin()
TControl::autoBindProperty()
TControl::autoDataBindProperties()
TControl::bindProperty()
TControl::broadcastEvent()
TControl::broadcastEventInternal()
TControl::bubbleEvent()
TControl::clearChildState()
TControl::clearControlState()
TControl::clearNamingContainer()
TControl::clearViewState()
TControl::createChildControls()
TControl::createControlCollection()
TControl::createdOnTemplate()
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::getEnabled()
TControl::getEnableTheming()
TControl::getEnableViewState()
TControl::getHasAdapter()
TControl::getHasAttributes()
TControl::getHasControls()
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::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::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
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.

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

Documentation generated on Sun, 04 Jun 2006 19:00:42 -0400 by phpDocumentor 1.3.0RC4