TMultiView serves as a container for a group of {@link TView} controls. The view collection can be retrieved by {@link 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 {@link setActiveView ActiveView} or {@link 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 {@link getViews Views} collection. TMultiView raises {@link OnActiveViewChanged OnActiveViewChanged} event when its active view is changed during a postback.
Since: 3.0
Author: Qiang Xue (qiang.xue@gmail.com)
Inheritance: extends Prado\Web\UI\TControl
Beispiel #1
0
 /**
  * @param TView the view to be activated
  * @throws TInvalidOperationException if the view is not in the view collection
  */
 public function setActiveView($value)
 {
     parent::setActiveView($value);
     if ($this->getActiveControl()->canUpdateClientSide()) {
         $this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
     }
 }