|
Class TMultiView
TMultiView class
TMultiView serves as a container for a group of TView controls. The
view collection can be retrieved by getViews Views. 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 setActiveView ActiveView or setActiveViewIndex
ActiveViewIndex.
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 getViews
Views collection.
TMultiView raises OnActiveViewChanged OnActiveViewChanged event when
its active view is changed during a postback.
-
TComponent
-
TApplicationComponent
-
TControl
implements
IRenderable,
IBindable
-
TMultiView
Methods summary
public
|
#
addParsedObject( string|TComponent $object )
Processes an object that is created during parsing template. This method
overrides the parent implementation by adding only TView controls as
children.
Processes an object that is created during parsing template. This method
overrides the parent implementation by adding only TView controls as
children.
Parameters
- $object
string|TComponent text string or component parsed and instantiated in template
Throws
See
Overrides
|
protected
TViewCollection
|
#
createControlCollection( )
Creates a control collection object that is to be used to hold child
controls
Creates a control collection object that is to be used to hold child
controls
Returns
Overrides
|
public
integer
|
#
getActiveViewIndex( )
Returns
integer the zero-based index of the current view in the view collection. -1 if no active
view. Default is -1.
|
public
|
#
setActiveViewIndex( integer $value )
Parameters
- $value
integer the zero-based index of the current view in the view collection. -1 if no active
view.
Throws
|
public
TView
|
#
getActiveView( )
Returns
TView
the currently active view, null if no active view
Throws
|
public
|
#
setActiveView( TView $view )
Parameters
- $view
TView
the view to be activated
Throws
|
protected
|
#
activateView( TView $view, boolean $triggerViewChangedEvent = true )
Activates the specified view. If there is any view currently active, it will
be deactivated.
Activates the specified view. If there is any view currently active, it will
be deactivated.
Parameters
- $view
TView
the view to be activated
- $triggerViewChangedEvent
boolean whether to trigger OnActiveViewChanged event.
|
public
TViewCollection
|
|
public
|
#
ignoreBubbleEvents( )
Makes the multiview ignore all bubbled events. This is method is used
internally by framework and control developers.
Makes the multiview ignore all bubbled events. This is method is used
internally by framework and control developers.
|
public
|
#
onInit( TEventParameter $param )
Initializes the active view if any. This method overrides the parent
implementation.
Initializes the active view if any. This method overrides the parent
implementation.
Parameters
Overrides
|
public
|
#
onActiveViewChanged( TEventParameter $param )
Raises OnActiveViewChanged event. The event is raised when the
currently active view is changed to a new one
Raises OnActiveViewChanged event. The event is raised when the
currently active view is changed to a new one
Parameters
|
public
boolean
|
#
bubbleEvent( TControl $sender, mixed $param )
Processes the events bubbled from child controls. The method handles
view-related command events.
Processes the events bubbled from child controls. The method handles
view-related command events.
Parameters
- $sender
TControl
sender of the event
- $param
mixed event parameter
Returns
boolean whether this event is handled
Overrides
|
public
|
#
loadState( )
Loads state into the wizard. This method is invoked by the framework when the
control state is being saved.
Loads state into the wizard. This method is invoked by the framework when the
control state is being saved.
Overrides
|
public
|
#
render( THtmlWriter $writer )
Renders the currently active view.
Renders the currently active view.
Parameters
- $writer
THtmlWriter
the writer for the rendering purpose.
Overrides
|
Methods inherited from TControl
__construct(),
__get(),
addToPostDataLoader(),
addedControl(),
applyStyleSheetSkin(),
autoBindProperty(),
autoDataBindProperties(),
bindProperty(),
broadcastEvent(),
clearChildState(),
clearControlState(),
clearNamingContainer(),
clearViewState(),
convertUniqueIdToClientId(),
createChildControls(),
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(),
loadStateRecursive(),
onDataBinding(),
onLoad(),
onPreRender(),
onUnload(),
preRenderRecursive(),
raiseBubbleEvent(),
registerObject(),
removeAttribute(),
removedControl(),
renderChildren(),
renderControl(),
saveState(),
saveStateRecursive(),
setAdapter(),
setAttribute(),
setChildControlsCreated(),
setControlStage(),
setControlState(),
setCustomData(),
setEnableTheming(),
setEnableViewState(),
setEnabled(),
setID(),
setPage(),
setSkinID(),
setTemplateControl(),
setViewState(),
setVisible(),
trackViewState(),
traverseChildControls(),
unbindProperty(),
unloadRecursive(),
unregisterObject()
|
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 |
CMD_NEXTVIEW |
'NextView' |
|
string |
CMD_PREVIOUSVIEW |
'PreviousView' |
|
string |
CMD_SWITCHVIEWID |
'SwitchViewID' |
|
string |
CMD_SWITCHVIEWINDEX |
'SwitchViewIndex' |
|
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
|
|