Class \Prado\Web\UI\WebControls\TMultiView
TMultiView serves as a container for a group of TView controls. The view collection can be retrieved by \Prado\Web\UI\WebControls\getViews. Each view contains child controls. TMultiView determines which view and its child controls are visible. At any time, at most one view is visible (called active). To make a view active, set \Prado\Web\UI\WebControls\setActiveView or \Prado\Web\UI\WebControls\setActiveViewIndex.
TMultiView also responds to specific command events raised from button controls contained in current active view. A command event with name 'NextView' will cause TMultiView to make the next available view active. Other command names recognized by TMultiView include
- PreviousView : switch to previous view
- SwitchViewID : switch to a view by its ID path
- SwitchViewIndex : switch to a view by its index in the \Prado\Web\UI\WebControls\getViews collection.
TMultiView raises \Prado\Web\UI\WebControls\OnActiveViewChanged event when its active view is changed during a postback.
Class hierarchy
- \Prado\Web\UI\WebControls\TMultiView
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.0
public
|
addParsedObject(TComponent|string $object) : mixed
Processes an object that is created during parsing template.
This method overrides the parent implementation by adding only TView controls as children. |
public
|
bubbleEvent(TControl $sender, mixed $param) : bool
Processes the events bubbled from child controls.
The method handles view-related command events. |
public
|
|
public
|
|
public
|
|
public
|
ignoreBubbleEvents() : mixed
Makes the multiview ignore all bubbled events.
This is method is used internally by framework and control developers. |
public
|
loadState() : mixed
Loads state into the wizard.
This method is invoked by the framework when the control state is being saved. |
public
|
onActiveViewChanged(TEventParameter $param) : mixed
Raises <b>OnActiveViewChanged</b> event.
The event is raised when the currently active view is changed to a new one |
public
|
onInit(TEventParameter $param) : mixed
Initializes the active view if any.
This method overrides the parent implementation. |
public
|
|
public
|
|
public
|
|
protected
|
activateView(TView $view[, bool $triggerViewChangedEvent = true ]) : mixed
Activates the specified view.
If there is any view currently active, it will be deactivated. |
protected
|
createControlCollection() : TViewCollection
Creates a control collection object that is to be used to hold child controls
|
public
mixed
|
CMD_NEXTVIEW
|
'NextView'
|
public
mixed
|
CMD_PREVIOUSVIEW
|
'PreviousView'
|
public
mixed
|
CMD_SWITCHVIEWID
|
'SwitchViewID'
|
public
mixed
|
CMD_SWITCHVIEWINDEX
|
'SwitchViewIndex'
|