Class TWizard
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, 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,
| Constants Inherited From TControl |
|
AUTOMATIC_ID_PREFIX,
CLIENT_ID_SEPARATOR,
CS_CHILD_INITIALIZED,
CS_CONSTRUCTED,
CS_INITIALIZED,
CS_LOADED,
CS_PRERENDERED,
CS_STATE_LOADED,
ID_FORMAT,
ID_SEPARATOR,
IS_CHILD_CREATED,
IS_CREATING_CHILD,
IS_DISABLE_THEMING,
IS_DISABLE_VIEWSTATE,
IS_ID_SET,
IS_SKIN_APPLIED,
IS_STYLESHEET_APPLIED,
RF_ADAPTER,
RF_AUTO_BINDINGS,
RF_CHILD_STATE,
RF_CONTROLS,
RF_CONTROLSTATE,
RF_DATA_BINDINGS,
RF_EVENTS,
RF_NAMED_CONTROLS,
RF_NAMED_CONTROLS_ID,
RF_NAMED_OBJECTS,
RF_SKIN_ID,
|
| Method Summary |
|
void
|
Adds a wizard step to the multiview.
|
|
void
|
|
|
protected
boolean
|
|
|
protected
boolean
|
|
|
protected
void
|
Applies various properties to the components of wizard
|
|
protected
void
|
Applies properties to the wizard header
|
|
protected
void
|
Apply properties to various navigation panels.
|
|
protected
void
|
Applies properties to the wizard sidebar
|
|
protected
void
|
Applies properties to the wizard step content
|
|
void
|
Handles bubbled events.
|
|
void
|
Creates child controls within the wizard
|
|
protected
void
|
Creates finish navigation panel.
|
|
protected
void
|
Creates the wizard header.
|
|
protected
void
|
Creates navigation panel.
|
|
protected
void
|
Creates the wizard side bar
|
|
protected
void
|
Creates start navigation panel.
|
|
protected
void
|
Creates wizard step content.
|
|
protected
void
|
Creates step navigation panel.
|
|
void
|
Event handler for sidebar datalist's OnItemCommand event.
|
|
void
|
Event handler for sidebar datalist's OnItemDataBound event.
|
|
TWizardStep
|
|
|
integer
|
|
|
TWizardNavigationButtonStyle
|
|
|
string
|
|
|
TWizardNavigationButtonStyle
|
|
|
string
|
|
|
TWizardNavigationContainer
|
|
|
ITemplate
|
|
|
TWizardNavigationButtonStyle
|
|
|
TPanel
|
|
|
TPanelStyle
|
|
|
ITemplate
|
|
|
string
|
|
|
protected
TStack
|
|
|
TMultiView
|
Returns the multiview that holds the wizard steps.
|
|
TStyle
|
|
|
TPanelStyle
|
|
|
protected
void
|
Determines the index of the previous step based on history.
|
|
boolean
|
|
|
boolean
|
|
|
TPanel
|
|
|
TStyle
|
|
|
TPanelStyle
|
|
|
ITemplate
|
|
|
TWizardNavigationContainer
|
|
|
ITemplate
|
|
|
TWizardNavigationButtonStyle
|
|
|
TPanel
|
|
|
TWizardNavigationContainer
|
|
|
ITemplate
|
|
|
TWizardNavigationButtonStyle
|
|
|
TWizardNavigationButtonStyle
|
|
|
TPanelStyle
|
|
|
protected
TWizardStepType
|
Determines the type of the specified wizard step.
|
|
protected
string
|
|
|
boolean
|
|
|
TWizardStepCollection
|
|
|
void
|
Raises OnActiveStepChanged event.
|
|
void
|
Raises OnCancelButtonClick event.
|
|
void
|
Raises OnCompleteButtonClick event.
|
|
void
|
Creates the child controls of the wizard.
|
|
void
|
Raises OnNextButtonClick event.
|
|
void
|
Raises OnPreviousButtonClick event.
|
|
void
|
Raises OnSideBarButtonClick event.
|
|
void
|
Removes a wizard step from the multiview.
|
|
void
|
Renders the wizard.
|
|
protected
void
|
Indicates the wizard needs to recreate all child controls.
|
|
protected
void
|
Clears up everything within the wizard.
|
|
void
|
Saves the current active step index into history.
|
|
void
|
|
|
void
|
|
|
void
|
|
|
void
|
|
|
void
|
|
|
void
|
|
|
void
|
|
|
void
|
|
|
void
|
|
|
void
|
|
|
void
|
|
|
void
|
|
|
void
|
|
|
void
|
Updates the sidebar datalist if any.
|
| 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()
|
| Methods Inherited From TControl |
|
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()
|
| Methods 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()
|
| Method Details |
addedWizardStep
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.
| Input |
| TWizardStep | $step | wizard step to be added into multiview. |
| Output |
| Exception |
|
addParsedObject
| public void addParsedObject |
(mixed $object ) |
Adds TWizardStep objects into step collection.
This method overrides the parent implementation and is invoked when template is being instantiated.
| Input |
| mixed | $object | object instantiated in template |
| Output |
| Exception |
|
allowNavigationToPreviousStep
| protected boolean allowNavigationToPreviousStep |
() |
| Output |
|
boolean
| whether navigation to the previous step is allowed |
| Exception |
|
allowNavigationToStep
| protected boolean allowNavigationToStep |
(integer $index ) |
| Input |
| integer | $index | index of the step |
| Output |
|
boolean
| whether navigation to the specified step is allowed |
| Exception |
|
applyControlProperties
| protected void applyControlProperties |
() |
Applies various properties to the components of wizard
|
applyHeaderProperties
| protected void applyHeaderProperties |
() |
Applies properties to the wizard header
|
applyNavigationProperties
| protected void applyNavigationProperties |
() |
Apply properties to various navigation panels.
|
applySideBarProperties
| protected void applySideBarProperties |
() |
Applies properties to the wizard sidebar
|
applyStepContentProperties
| protected void applyStepContentProperties |
() |
Applies properties to the wizard step content
|
bubbleEvent
Handles bubbled events.
This method mainly translate certain command events into wizard-specific events.
| Input |
| mixed | $sender | sender of the original command event |
| TEventParameter | $param | event parameter |
| Output |
| Exception |
| throws | TInvalidDataValueException if a navigation command is associated with an invalid parameter |
|
createChildControls
| public void createChildControls |
() |
Creates child controls within the wizard
|
createFinishNavigation
| protected void createFinishNavigation |
() |
Creates finish navigation panel.
|
createHeader
| protected void createHeader |
() |
Creates the wizard header.
|
createNavigation
| protected void createNavigation |
() |
Creates navigation panel.
|
createSideBar
| protected void createSideBar |
() |
Creates the wizard side bar
|
createStartNavigation
| protected void createStartNavigation |
() |
Creates start navigation panel.
|
createStepContent
| protected void createStepContent |
() |
Creates wizard step content.
|
createStepNavigation
| protected void createStepNavigation |
() |
Creates step navigation panel.
|
dataListItemCommand
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.
|
dataListItemDataBound
Event handler for sidebar datalist's OnItemDataBound event.
This method is used internally by wizard. It mainly configures the buttons in the sidebar datalist.
|
getActiveStep
| Output |
|
TWizardStep
| the currently active wizard step |
| Exception |
|
getActiveStepIndex
| public integer getActiveStepIndex |
() |
| Output |
|
integer
| the zero-based index of the active wizard step |
| Exception |
|
getCancelButtonStyle
|
getCancelDestinationUrl
| public string getCancelDestinationUrl |
() |
| Output |
|
string
| the URL that the browser will be redirected to if the cancel button in the wizard is clicked. Defaults to ''. |
| Exception |
|
getFinishCompleteButtonStyle
|
getFinishDestinationUrl
| public string getFinishDestinationUrl |
() |
| Output |
|
string
| the URL that the browser will be redirected to if the wizard finishes. Defaults to ''. |
| Exception |
|
getFinishNavigation
|
getFinishNavigationTemplate
| public ITemplate getFinishNavigationTemplate |
() |
| Output |
|
ITemplate
| navigation template for the finish step. Defaults to null. |
| Exception |
|
getFinishPreviousButtonStyle
|
getHeader
| Output |
|
TPanel
| container of the wizard header |
| Exception |
|
getHeaderStyle
|
getHeaderTemplate
| Output |
|
ITemplate
| template for wizard header. Defaults to null. |
| Exception |
|
getHeaderText
| public string getHeaderText |
() |
| Output |
|
string
| header text. Defaults to ''. |
| Exception |
|
getHistory
| protected TStack getHistory |
() |
| Output |
|
TStack
| history containing step indexes that were navigated before |
| Exception |
|
getMultiView
Returns the multiview that holds the wizard steps.
This method should only be used by control developers.
| Output |
|
TMultiView
| the multiview holding wizard steps |
| Exception |
|
getNavigationButtonStyle
| public TStyle getNavigationButtonStyle |
() |
| Output |
|
TStyle
| the style common for all navigation buttons. |
| Exception |
|
getNavigationStyle
| Output |
|
TPanelStyle
| the style for the navigation panel. |
| Exception |
|
getPreviousStepIndex
| protected void getPreviousStepIndex |
(boolean $popStack ) |
Determines the index of the previous step based on history.
| Input |
| boolean | $popStack | whether the first item in the history stack should be popped up after calling this method. |
| Output |
| Exception |
|
getShowCancelButton
| public boolean getShowCancelButton |
() |
| Output |
|
boolean
| whether to display a cancel button in each wizard step. Defaults to false. |
| Exception |
|
getShowSideBar
| public boolean getShowSideBar |
() |
| Output |
|
boolean
| whether to display a side bar that contains links to wizard steps. Defaults to true. |
| Exception |
|
getSideBar
| Output |
|
TPanel
| container of the wizard side bar |
| Exception |
|
getSideBarButtonStyle
| public TStyle getSideBarButtonStyle |
() |
| Output |
|
TStyle
| the style for the buttons displayed in the side bar. |
| Exception |
|
getSideBarStyle
| Output |
|
TPanelStyle
| the style for the side bar. |
| Exception |
|
getSideBarTemplate
| Output |
|
ITemplate
| template for the side bar. Defaults to null. |
| Exception |
|
getStartNavigation
|
getStartNavigationTemplate
| public ITemplate getStartNavigationTemplate |
() |
| Output |
|
ITemplate
| navigation template for the start step. Defaults to null. |
| Exception |
|
getStartNextButtonStyle
|
getStepContent
| public TPanel getStepContent |
() |
| Output |
|
TPanel
| container of the wizard step content |
| Exception |
|
getStepNavigation
|
getStepNavigationTemplate
| public ITemplate getStepNavigationTemplate |
() |
| Output |
|
ITemplate
| navigation template for internal steps. Defaults to null. |
| Exception |
|
getStepNextButtonStyle
|
getStepPreviousButtonStyle
|
getStepStyle
| Output |
|
TPanelStyle
| the style for each internal wizard step. |
| Exception |
|
getStepType
Determines the type of the specified wizard step.
|
getTagName
| protected string getTagName |
() |
| Output |
|
string
| tag name for the wizard |
| Exception |
|
getUseDefaultLayout
| public boolean getUseDefaultLayout |
() |
| Output |
|
boolean
| whether to use default layout to arrange side bar and the rest wizard components. Defaults to true. |
| Exception |
|
getWizardSteps
|
onActiveStepChanged
Raises OnActiveStepChanged event.
This event is raised when the current visible step is changed in the wizard.
|
onCancelButtonClick
Raises OnCancelButtonClick event.
This event is raised when a cancel navigation button is clicked in the current active step.
|
onCompleteButtonClick
Raises OnCompleteButtonClick event.
This event is raised when a finish navigation button is clicked in the current active step.
|
onInit
Creates the child controls of the wizard.
This method overrides the parent implementation.
|
onNextButtonClick
Raises OnNextButtonClick event.
This event is raised when a next navigation button is clicked in the current active step.
|
onPreviousButtonClick
Raises OnPreviousButtonClick event.
This event is raised when a previous navigation button is clicked in the current active step.
|
onSideBarButtonClick
Raises OnSideBarButtonClick event.
This event is raised when a link button in the side bar is clicked.
|
removedWizardStep
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.
| Input |
| TWizardStep | $step | wizard step to be removed from multiview. |
| Output |
| Exception |
|
render
Renders the wizard.
|
requiresControlsRecreation
| protected void requiresControlsRecreation |
() |
Indicates the wizard needs to recreate all child controls.
|
reset
Clears up everything within the wizard.
|
saveState
Saves the current active step index into history.
This method is invoked by the framework when the control state is being saved.
|
setActiveStep
| Input |
| TWizardStep | $step | step to be activated |
| Output |
| Exception |
| throws | TInvalidOperationException if the step is not in the wizard step collection |
|
setActiveStepIndex
| public void setActiveStepIndex |
(integer $value ) |
| Input |
| integer | $value | the zero-based index of the wizard step to be activated |
| Output |
| Exception |
|
setCancelDestinationUrl
| public void setCancelDestinationUrl |
(string $value ) |
| Input |
| string | $value | the URL that the browser will be redirected to if the cancel button in the wizard is clicked. |
| Output |
| Exception |
|
setFinishDestinationUrl
| public void setFinishDestinationUrl |
(string $value ) |
| Input |
| string | $value | the URL that the browser will be redirected to if the wizard finishes. |
| Output |
| Exception |
|
setFinishNavigationTemplate
| public void setFinishNavigationTemplate |
(ITemplate $value ) |
| Input |
| ITemplate | $value | navigation template for the finish step. |
| Output |
| Exception |
|
setHeaderTemplate
| public void setHeaderTemplate |
(ITemplate $value ) |
| Input |
| ITemplate | $value | template for wizard header. |
| Output |
| Exception |
|
setHeaderText
| public void setHeaderText |
(string $value ) |
| Input |
| string | $value | header text. |
| Output |
| Exception |
|
setShowCancelButton
| public void setShowCancelButton |
(boolean $value ) |
| Input |
| boolean | $value | whether to display a cancel button in each wizard step. |
| Output |
| Exception |
|
setShowSideBar
| public void setShowSideBar |
(boolean $value ) |
| Input |
| boolean | $value | whether to display a side bar that contains links to wizard steps. |
| Output |
| Exception |
|
setSideBarTemplate
| public void setSideBarTemplate |
(ITemplate $value ) |
| Input |
| ITemplate | $value | template for the side bar. |
| Output |
| Exception |
|
setStartNavigationTemplate
| public void setStartNavigationTemplate |
(ITemplate $value ) |
| Input |
| ITemplate | $value | navigation template for the start step. |
| Output |
| Exception |
|
setStepNavigationTemplate
| public void setStepNavigationTemplate |
(ITemplate $value ) |
| Input |
| ITemplate | $value | navigation template for internal steps. |
| Output |
| Exception |
|
setUseDefaultLayout
| public void setUseDefaultLayout |
(boolean $value ) |
| Input |
| 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. |
| Output |
| Exception |
|
wizardStepsChanged
| public void wizardStepsChanged |
() |
Updates the sidebar datalist if any.
This method is invoked when any wizard step is changed.
|
| Constant Details |
CMD_CANCEL
Type:
string
Value:
'Cancel'
|
CMD_COMPLETE
Type:
string
Value:
'Complete'
|
CMD_MOVETO
Type:
string
Value:
'MoveTo'
|
CMD_NEXT
Type:
string
Value:
'NextStep'
|
CMD_PREVIOUS
Navigation commands.
Type:
string
Value:
'PreviousStep'
|
ID_SIDEBAR_BUTTON
Side bar button ID
Type:
string
Value:
'SideBarButton'
|
ID_SIDEBAR_LIST
Side bar data list
Type:
string
Value:
'SideBarList'
|
ST_AUTO
Wizard step types.
Type:
string
Value:
'Auto'
Deprecated:
deprecated since version 3.0.4 (use TWizardStepType constants instead)
|
ST_COMPLETE
Type:
string
Value:
'Complete'
|
ST_FINISH
Type:
string
Value:
'Finish'
|
ST_START
Type:
string
Value:
'Start'
|
ST_STEP
Type:
string
Value:
'Step'
|
|