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 getWizardSteps WizardSteps. In template, wizard steps can
be added into a wizard using the following syntax,
<com:TWizard> <com:TWizardStep Title="step 1"> content in step 1, may contain other controls </com:TWizardStep> <com:TWizardStep Title="step 2"> content in step 2, may contain other controls </com:TWizardStep> </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 getActiveStep ActiveStep. Its index in the step collection is given by getActiveStepIndex 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,
- header: setHeaderText HeaderText and setHeaderTemplate HeaderTemplate. If both are present, the latter takes precedence.
- step: getWizardSteps WizardSteps.
- navigation: setStartNavigationTemplate StartNavigationTemplate, setStepNavigationTemplate StepNavigationTemplate, setFinishNavigationTemplate FinishNavigationTemplate. Default templates will be used if above templates are not set.
- side bar: setSideBarTemplate SideBarTemplate. A default template will be used if this template is not set. Its visibility is toggled by setShowSideBar ShowSideBar.
The style of these wizard layout components can be customized via the following style properties,
- header: getHeaderStyle HeaderStyle.
- step: getStepStyle StepStyle.
- navigation: getNavigationStyle NavigationStyle, getStartNextButtonStyle StartNextButtonStyle, getStepNextButtonStyle StepNextButtonStyle, getStepPreviousButtonStyle StepPreviousButtonStyle, getFinishPreviousButtonStyle FinishPreviousButtonStyle, getFinishCompleteButtonStyle FinishCompleteButtonStyle, getCancelButtonStyle CancelButtonStyle.
- side bar: getSideBarStyle SideBarStyle and getSideBarButtonStyle SideBarButtonStyle.
- TComponent
-
TApplicationComponent
-
TControl implements IRenderable, IBindable
-
TWebControl implements IStyleable
-
TWizard implements INamingContainer
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at Web/UI/WebControls/TWizard.php
protected
string
|
|
public
|
#
addParsedObject( mixed $object )
Adds |
public
|
|
public
|
|
public
integer
|
|
public
|
|
public
|
|
public
boolean
|
|
public
|
|
public
boolean
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
boolean
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
onActiveStepChanged(
Raises OnActiveStepChanged event. This event is raised when the current visible step is changed in the wizard. |
public
|
#
onCancelButtonClick(
Raises OnCancelButtonClick event. This event is raised when a cancel navigation button is clicked in the current active step. |
public
|
#
onCompleteButtonClick(
Raises OnCompleteButtonClick event. This event is raised when a finish navigation button is clicked in the current active step. |
public
|
#
onNextButtonClick(
Raises OnNextButtonClick event. This event is raised when a next navigation button is clicked in the current active step. |
public
|
#
onPreviousButtonClick(
Raises OnPreviousButtonClick event. This event is raised when a previous navigation button is clicked in the current active step. |
public
|
#
onSideBarButtonClick(
Raises OnSideBarButtonClick event. This event is raised when a link button in the side bar is clicked. |
public
|
#
getMultiView( )
Returns the multiview that holds the wizard steps. This method should only be used by control developers. |
public
|
#
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. |
public
|
#
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. |
public
|
#
onInit(
Creates the child controls of the wizard. This method overrides the parent implementation. |
public
|
#
saveState( )
Saves the current active step index into history. This method is invoked by the framework when the control state is being saved. |
protected
|
|
public
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
public
|
|
protected
|
|
protected
|
|
public
|
#
dataListItemCommand( mixed $sender,
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. |
public
|
#
dataListItemDataBound( mixed $sender,
Event handler for sidebar datalist's OnItemDataBound event. This method is used internally by wizard. It mainly configures the buttons in the sidebar datalist. |
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
public
|
#
wizardStepsChanged( )
Updates the sidebar datalist if any. This method is invoked when any wizard step is changed. |
protected
|
#
getPreviousStepIndex( boolean $popStack )
Determines the index of the previous step based on history. |
protected
boolean
|
|
protected
boolean
|
|
public
boolean
|
#
bubbleEvent( mixed $sender,
Handles bubbled events. This method mainly translate certain command events into wizard-specific events. |
getApplication(),
getRequest(),
getResponse(),
getService(),
getSession(),
getUser(),
publishAsset(),
publishFilePath()
|
string |
ST_AUTO |
'Auto' |
#
Wizard step types. |
string |
ST_START |
'Start' |
|
string |
ST_STEP |
'Step' |
|
string |
ST_FINISH |
'Finish' |
|
string |
ST_COMPLETE |
'Complete' |
|
string |
CMD_PREVIOUS |
'PreviousStep' |
#
Navigation commands. |
string |
CMD_NEXT |
'NextStep' |
|
string |
CMD_CANCEL |
'Cancel' |
|
string |
CMD_COMPLETE |
'Complete' |
|
string |
CMD_MOVETO |
'MoveTo' |
|
string |
ID_SIDEBAR_BUTTON |
'SideBarButton' |
#
Side bar button ID |
string |
ID_SIDEBAR_LIST |
'SideBarList' |
#
Side bar data list |
GLOBAL_RAISE_EVENT_LISTENER
|
$_decorator
|