PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

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
Extended by TApplicationComponent
Extended by TControl implements IRenderable, IBindable
Extended by TWebControl implements IStyleable
Extended by TWizard implements INamingContainer
Package: System\Web\UI\WebControls
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
Methods summary
protected string
# getTagName( )

Returns

string
tag name for the wizard

Overrides

TWebControl::getTagName()
public
# addParsedObject( mixed $object )

Adds TWizardStep objects into step collection. This method overrides the parent implementation and is invoked when template is being instantiated.

Adds TWizardStep objects into step collection. This method overrides the parent implementation and is invoked when template is being instantiated.

Parameters

$object
mixed
object instantiated in template

Overrides

TControl::addParsedObject()
public TWizardStep
# getActiveStep( )

Returns

TWizardStep
the currently active wizard step
public
# setActiveStep( TWizardStep $step )

Parameters

$step
TWizardStep
step to be activated

Throws

TInvalidOperationException
if the step is not in the wizard step collection
public integer
# getActiveStepIndex( )

Returns

integer
the zero-based index of the active wizard step
public
# setActiveStepIndex( integer $value )

Parameters

$value
integer
the zero-based index of the wizard step to be activated
public TWizardStepCollection
# getWizardSteps( )

Returns

TWizardStepCollection
collection of wizard steps
public boolean
# getShowCancelButton( )

Returns

boolean
whether to display a cancel button in each wizard step. Defaults to false.
public
# setShowCancelButton( boolean $value )

Parameters

$value
boolean
whether to display a cancel button in each wizard step.
public boolean
# getShowSideBar( )

Returns

boolean
whether to display a side bar that contains links to wizard steps. Defaults to true.
public
# setShowSideBar( boolean $value )

Parameters

$value
boolean
whether to display a side bar that contains links to wizard steps.
public ITemplate
# getStartNavigationTemplate( )

Returns

ITemplate
navigation template for the start step. Defaults to null.
public
# setStartNavigationTemplate( ITemplate $value )

Parameters

$value
ITemplate
navigation template for the start step.
public ITemplate
# getStepNavigationTemplate( )

Returns

ITemplate
navigation template for internal steps. Defaults to null.
public
# setStepNavigationTemplate( ITemplate $value )

Parameters

$value
ITemplate
navigation template for internal steps.
public ITemplate
# getFinishNavigationTemplate( )

Returns

ITemplate
navigation template for the finish step. Defaults to null.
public
# setFinishNavigationTemplate( ITemplate $value )

Parameters

$value
ITemplate
navigation template for the finish step.
public ITemplate
# getHeaderTemplate( )

Returns

ITemplate
template for wizard header. Defaults to null.
public
# setHeaderTemplate( ITemplate $value )

Parameters

$value
ITemplate
template for wizard header.
public ITemplate
# getSideBarTemplate( )

Returns

ITemplate
template for the side bar. Defaults to null.
public
# setSideBarTemplate( ITemplate $value )

Parameters

$value
ITemplate
template for the side bar.
public string
# getHeaderText( )

Returns

string
header text. Defaults to ''.
public
# setHeaderText( string $value )

Parameters

$value
string
header text.
public string
# getCancelDestinationUrl( )

Returns

string
the URL that the browser will be redirected to if the cancel button in the wizard is clicked. Defaults to ''.
public
# setCancelDestinationUrl( string $value )

Parameters

$value
string
the URL that the browser will be redirected to if the cancel button in the wizard is clicked.
public string
# getFinishDestinationUrl( )

Returns

string
the URL that the browser will be redirected to if the wizard finishes. Defaults to ''.
public
# setFinishDestinationUrl( string $value )

Parameters

$value
string
the URL that the browser will be redirected to if the wizard finishes.
public TStyle
# getSideBarButtonStyle( )

Returns

TStyle
the style for the buttons displayed in the side bar.
public TStyle
# getNavigationButtonStyle( )

Returns

TStyle
the style common for all navigation buttons.
public TWizardNavigationButtonStyle
# getStartNextButtonStyle( )

Returns

TWizardNavigationButtonStyle
the style for the next button in the start wizard step.
public TWizardNavigationButtonStyle
# getStepNextButtonStyle( )

Returns

TWizardNavigationButtonStyle
the style for the next button in each internal wizard step.
public TWizardNavigationButtonStyle
# getStepPreviousButtonStyle( )

Returns

TWizardNavigationButtonStyle
the style for the previous button in the start wizard step.
public TWizardNavigationButtonStyle
# getFinishCompleteButtonStyle( )

Returns

TWizardNavigationButtonStyle
the style for the complete button in the finish wizard step.
public TWizardNavigationButtonStyle
# getFinishPreviousButtonStyle( )

Returns

TWizardNavigationButtonStyle
the style for the previous button in the start wizard step.
public TWizardNavigationButtonStyle
# getCancelButtonStyle( )

Returns

TWizardNavigationButtonStyle
the style for the cancel button
public TPanelStyle
# getSideBarStyle( )

Returns

TPanelStyle
the style for the side bar.
public TPanelStyle
# getHeaderStyle( )

Returns

TPanelStyle
the style for the header.
public TPanelStyle
# getStepStyle( )

Returns

TPanelStyle
the style for each internal wizard step.
public TPanelStyle
# getNavigationStyle( )

Returns

TPanelStyle
the style for the navigation panel.
public boolean
# getUseDefaultLayout( )

Returns

boolean
whether to use default layout to arrange side bar and the rest wizard components. Defaults to true.
public
# setUseDefaultLayout( boolean $value )

Parameters

$value
boolean
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.
public TPanel
# getHeader( )

Returns

TPanel
container of the wizard header
public TPanel
# getStepContent( )

Returns

TPanel
container of the wizard step content
public TPanel
# getSideBar( )

Returns

TPanel
container of the wizard side bar
public TWizardNavigationContainer
# getStartNavigation( )

Returns

TWizardNavigationContainer
container of the start navigation
public TWizardNavigationContainer
# getStepNavigation( )

Returns

TWizardNavigationContainer
container of the step navigation
public TWizardNavigationContainer
# getFinishNavigation( )

Returns

TWizardNavigationContainer
container of the finish navigation
public
# onActiveStepChanged( TEventParameter $param )

Raises OnActiveStepChanged event. This event is raised when the current visible step is changed in the wizard.

Raises OnActiveStepChanged event. This event is raised when the current visible step is changed in the wizard.

Parameters

$param
TEventParameter
event parameter
public
# onCancelButtonClick( TEventParameter $param )

Raises OnCancelButtonClick event. This event is raised when a cancel navigation button is clicked in the current active step.

Raises OnCancelButtonClick event. This event is raised when a cancel navigation button is clicked in the current active step.

Parameters

$param
TEventParameter
event parameter
public
# onCompleteButtonClick( TWizardNavigationEventParameter $param )

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

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

Parameters

$param
TWizardNavigationEventParameter
event parameter
public
# onNextButtonClick( TWizardNavigationEventParameter $param )

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

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

Parameters

$param
TWizardNavigationEventParameter
event parameter
public
# onPreviousButtonClick( TWizardNavigationEventParameter $param )

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

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

Parameters

$param
TWizardNavigationEventParameter
event parameter
public
# onSideBarButtonClick( TWizardNavigationEventParameter $param )

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

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

Parameters

$param
TWizardNavigationEventParameter
event parameter
public TMultiView
# getMultiView( )

Returns the multiview that holds the wizard steps. This method should only be used by control developers.

Returns the multiview that holds the wizard steps. This method should only be used by control developers.

Returns

TMultiView
the multiview holding wizard steps
public
# addedWizardStep( TWizardStep $step )

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.

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.

Parameters

$step
TWizardStep
wizard step to be added into multiview.
public
# removedWizardStep( TWizardStep $step )

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.

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.

Parameters

$step
TWizardStep
wizard step to be removed from multiview.
public
# onInit( TEventParameter $param )

Creates the child controls of the wizard. This method overrides the parent implementation.

Creates the child controls of the wizard. This method overrides the parent implementation.

Parameters

$param
TEventParameter
event parameter

Overrides

TControl::onInit()
public
# saveState( )

Saves the current active step index into history. This method is invoked by the framework when the control state is being saved.

Saves the current active step index into history. This method is invoked by the framework when the control state is being saved.

Overrides

TControl::saveState()
protected
# requiresControlsRecreation( )

Indicates the wizard needs to recreate all child controls.

Indicates the wizard needs to recreate all child controls.

public
# render( THtmlWriter $writer )

Renders the wizard.

Renders the wizard.

Parameters

$writer
THtmlWriter

Overrides

TWebControl::render()
protected
# applyControlProperties( )

Applies various properties to the components of wizard

Applies various properties to the components of wizard

protected
# applyHeaderProperties( )

Applies properties to the wizard header

Applies properties to the wizard header

protected
# applySideBarProperties( )

Applies properties to the wizard sidebar

Applies properties to the wizard sidebar

protected
# applyStepContentProperties( )

Applies properties to the wizard step content

Applies properties to the wizard step content

protected
# applyNavigationProperties( )

Apply properties to various navigation panels.

Apply properties to various navigation panels.

protected TStack
# getHistory( )

Returns

TStack
history containing step indexes that were navigated before
protected TWizardStepType
# getStepType( TWizardStep $wizardStep )

Determines the type of the specified wizard step.

Determines the type of the specified wizard step.

Parameters

$wizardStep
TWizardStep

Returns

TWizardStepType
type of the step
protected
# reset( )

Clears up everything within the wizard.

Clears up everything within the wizard.

public
# createChildControls( )

Creates child controls within the wizard

Creates child controls within the wizard

Overrides

TControl::createChildControls()
protected
# createHeader( )

Creates the wizard header.

Creates the wizard header.

protected
# createSideBar( )

Creates the wizard side bar

Creates the wizard side bar

public
# dataListItemCommand( mixed $sender, TDataListCommandEventParameter $param )

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.

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.

Parameters

$sender
mixed
sender of the event
$param
TDataListCommandEventParameter
public
# dataListItemDataBound( mixed $sender, TDataListItemEventParameter $param )

Event handler for sidebar datalist's OnItemDataBound event. This method is used internally by wizard. It mainly configures the buttons in the sidebar datalist.

Event handler for sidebar datalist's OnItemDataBound event. This method is used internally by wizard. It mainly configures the buttons in the sidebar datalist.

Parameters

$sender
mixed
sender of the event
$param
TDataListItemEventParameter
protected
# createStepContent( )

Creates wizard step content.

Creates wizard step content.

protected
# createNavigation( )

Creates navigation panel.

Creates navigation panel.

protected
# createStartNavigation( )

Creates start navigation panel.

Creates start navigation panel.

protected
# createStepNavigation( )

Creates step navigation panel.

Creates step navigation panel.

protected
# createFinishNavigation( )

Creates finish navigation panel.

Creates finish navigation panel.

public
# wizardStepsChanged( )

Updates the sidebar datalist if any. This method is invoked when any wizard step is changed.

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.

Determines the index of the previous step based on history.

Parameters

$popStack
boolean
whether the first item in the history stack should be popped up after calling this method.
protected boolean
# allowNavigationToPreviousStep( )

Returns

boolean
whether navigation to the previous step is allowed
protected boolean
# allowNavigationToStep( integer $index )

Parameters

$index
integer
index of the step

Returns

boolean
whether navigation to the specified step is allowed
public boolean
# bubbleEvent( mixed $sender, TEventParameter $param )

Handles bubbled events. This method mainly translate certain command events into wizard-specific events.

Handles bubbled events. This method mainly translate certain command events into wizard-specific events.

Parameters

$sender
mixed
sender of the original command event
$param
TEventParameter
event parameter

Returns

boolean
true if the event bubbling is handled and no more bubbling.

Throws

TInvalidDataValueException
if a navigation command is associated with an invalid parameter

Overrides

TControl::bubbleEvent()
Methods inherited from TWebControl
addAttributesToRender(), clearStyle(), copyBaseAttributes(), createStyle(), getAccessKey(), getBackColor(), getBorderColor(), getBorderStyle(), getBorderWidth(), getCssClass(), getDecorator(), getDisplay(), getEnsureId(), getFont(), getForeColor(), getHasStyle(), getHeight(), getStyle(), getTabIndex(), getToolTip(), getWidth(), onPreRender(), renderBeginTag(), renderContents(), renderEndTag(), setAccessKey(), setBackColor(), setBorderColor(), setBorderStyle(), setBorderWidth(), setCssClass(), setDisplay(), setEnsureId(), setForeColor(), setHeight(), setStyle(), setTabIndex(), setToolTip(), setWidth()
Methods inherited from TControl
__construct(), __get(), addToPostDataLoader(), addedControl(), applyStyleSheetSkin(), autoBindProperty(), autoDataBindProperties(), bindProperty(), broadcastEvent(), clearChildState(), clearControlState(), clearNamingContainer(), clearViewState(), convertUniqueIdToClientId(), createControlCollection(), dataBind(), dataBindChildren(), dataBindProperties(), ensureChildControls(), findControl(), findControlsByID(), findControlsByType(), focus(), getAdapter(), getAllowChildControls(), getAttribute(), getAttributes(), getChildControlsCreated(), getClientID(), getControlStage(), getControlState(), getControls(), getCustomData(), getEnableTheming(), getEnableViewState(), getEnabled(), getHasAdapter(), getHasAttributes(), getHasChildInitialized(), getHasControls(), getHasInitialized(), getHasLoaded(), getHasLoadedPostData(), getHasPreRendered(), getID(), getIsSkinApplied(), getNamingContainer(), getPage(), getParent(), getRegisteredObject(), getSkinID(), getSourceTemplateControl(), getTemplateControl(), getUniqueID(), getViewState(), getVisible(), hasAttribute(), initRecursive(), isDescendentOf(), isObjectRegistered(), loadRecursive(), loadState(), loadStateRecursive(), onDataBinding(), onLoad(), onUnload(), preRenderRecursive(), raiseBubbleEvent(), registerObject(), removeAttribute(), removedControl(), renderChildren(), renderControl(), saveStateRecursive(), setAdapter(), setAttribute(), setChildControlsCreated(), setControlStage(), setControlState(), setCustomData(), setEnableTheming(), setEnableViewState(), setEnabled(), setID(), setPage(), setSkinID(), setTemplateControl(), setViewState(), setVisible(), trackViewState(), traverseChildControls(), unbindProperty(), unloadRecursive(), unregisterObject()
Methods inherited from TApplicationComponent
getApplication(), getRequest(), getResponse(), getService(), getSession(), getUser(), publishAsset(), publishFilePath()
Methods inherited from TComponent
__call(), __destruct(), __isset(), __set(), __sleep(), __unset(), __wakeup(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants summary
string ST_AUTO 'Auto'
#

Wizard step types.

Wizard step types.

Deprecated

deprecated since version 3.0.4 (use TWizardStepType constants instead)
string ST_START 'Start'
#
string ST_STEP 'Step'
#
string ST_FINISH 'Finish'
#
string ST_COMPLETE 'Complete'
#
string CMD_PREVIOUS 'PreviousStep'
#

Navigation commands.

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

Side bar button ID

string ID_SIDEBAR_LIST 'SideBarList'
#

Side bar data list

Side bar data list

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
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Properties inherited from TWebControl
$_decorator
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO