Class \Prado\Web\UI\WebControls\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 \Prado\Web\UI\WebControls\getWizardSteps. 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 \Prado\Web\UI\WebControls\getActiveStep. Its index in the step collection is given by \Prado\Web\UI\WebControls\getActiveStepIndex.
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: \Prado\Web\UI\WebControls\setHeaderText and \Prado\Web\UI\WebControls\setHeaderTemplate. If both are present, the latter takes precedence.
- step: \Prado\Web\UI\WebControls\getWizardSteps.
- navigation: \Prado\Web\UI\WebControls\setStartNavigationTemplate, \Prado\Web\UI\WebControls\setStepNavigationTemplate, \Prado\Web\UI\WebControls\setFinishNavigationTemplate. Default templates will be used if above templates are not set.
- side bar: \Prado\Web\UI\WebControls\setSideBarTemplate. A default template will be used if this template is not set. Its visibility is toggled by \Prado\Web\UI\WebControls\setShowSideBar.
The style of these wizard layout components can be customized via the following style properties,
- header: \Prado\Web\UI\WebControls\getHeaderStyle.
- step: \Prado\Web\UI\WebControls\getStepStyle.
- navigation: \Prado\Web\UI\WebControls\getNavigationStyle, \Prado\Web\UI\WebControls\getStartNextButtonStyle, \Prado\Web\UI\WebControls\getStepNextButtonStyle, \Prado\Web\UI\WebControls\getStepPreviousButtonStyle, \Prado\Web\UI\WebControls\getFinishPreviousButtonStyle, \Prado\Web\UI\WebControls\getFinishCompleteButtonStyle, \Prado\Web\UI\WebControls\getCancelButtonStyle.
- side bar: \Prado\Web\UI\WebControls\getSideBarStyle and \Prado\Web\UI\WebControls\getSideBarButtonStyle.
Class hierarchy
- \Prado\Web\UI\WebControls\TWizard implements INamingContainer
- \Prado\Web\UI\WebControls\TWebControl implements IStyleable
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.0
public
|
addedWizardStep(TWizardStep $step) : mixed
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
|
addParsedObject(mixed $object) : mixed
Adds {@see \Prado\Web\UI\WebControls\TWizardStep} objects into step collection.
This method overrides the parent implementation and is invoked when template is being instantiated. |
public
|
bubbleEvent(mixed $sender, TEventParameter $param) : mixed
Handles bubbled events.
This method mainly translate certain command events into wizard-specific events. |
public
|
|
public
|
dataListItemCommand(mixed $sender, TDataListCommandEventParameter $param) : mixed
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, TDataListItemEventParameter $param) : mixed
Event handler for sidebar datalist's OnItemDataBound event.
This method is used internally by wizard. It mainly configures the buttons in the sidebar datalist. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
getMultiView() : TMultiView
Returns the multiview that holds the wizard steps.
This method should only be used by control developers. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
onActiveStepChanged(TEventParameter $param) : mixed
Raises <b>OnActiveStepChanged</b> event.
This event is raised when the current visible step is changed in the wizard. |
public
|
onCancelButtonClick(TEventParameter $param) : mixed
Raises <b>OnCancelButtonClick</b> event.
This event is raised when a cancel navigation button is clicked in the current active step. |
public
|
onCompleteButtonClick(TWizardNavigationEventParameter $param) : mixed
Raises <b>OnCompleteButtonClick</b> event.
This event is raised when a finish navigation button is clicked in the current active step. |
public
|
onInit(TEventParameter $param) : mixed
Creates the child controls of the wizard.
This method overrides the parent implementation. |
public
|
onNextButtonClick(TWizardNavigationEventParameter $param) : mixed
Raises <b>OnNextButtonClick</b> event.
This event is raised when a next navigation button is clicked in the current active step. |
public
|
onPreviousButtonClick(TWizardNavigationEventParameter $param) : mixed
Raises <b>OnPreviousButtonClick</b> event.
This event is raised when a previous navigation button is clicked in the current active step. |
public
|
onSideBarButtonClick(TWizardNavigationEventParameter $param) : mixed
Raises <b>OnSideBarButtonClick</b> event.
This event is raised when a link button in the side bar is clicked. |
public
|
removedWizardStep(TWizardStep $step) : mixed
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
|
|
public
|
saveState() : mixed
Saves the current active step index into history.
This method is invoked by the framework when the control state is being saved. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
wizardStepsChanged() : mixed
Updates the sidebar datalist if any.
This method is invoked when any wizard step is changed. |
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
getPreviousStepIndex(bool $popStack) : mixed
Determines the index of the previous step based on history.
|
protected
|
|
protected
|
|
protected
|
|
protected
|
public
mixed
|
CMD_CANCEL
|
'Cancel'
|
public
mixed
|
CMD_COMPLETE
|
'Complete'
|
public
mixed
|
CMD_MOVETO
|
'MoveTo'
|
public
mixed
|
CMD_NEXT
|
'NextStep'
|
public
mixed
|
CMD_PREVIOUS
Navigation commands.
|
'PreviousStep'
|
public
mixed
|
ID_SIDEBAR_BUTTON
Side bar button ID
|
'SideBarButton'
|
public
mixed
|
ID_SIDEBAR_LIST
Side bar data list
|
'SideBarList'
|