From 2f36ce50b85cf0d02174464356e6636d14f4c19a Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 2 Apr 2006 00:23:25 +0000 Subject: Added TMultiView tutorial and demo. --- HISTORY | 9 +++--- .../protected/pages/Controls/MultiView.page | 37 ++++++++++++++++++++++ .../protected/pages/Controls/Standard.page | 2 +- framework/Web/UI/WebControls/TMultiView.php | 9 ++++-- 4 files changed, 49 insertions(+), 8 deletions(-) diff --git a/HISTORY b/HISTORY index cef310c4..b47c0e60 100644 --- a/HISTORY +++ b/HISTORY @@ -1,13 +1,14 @@ Version 3.0RC1 April 1, 2006 ============================ -BUG: Ticket#88 - Unclosed HTML tag in TDatePicker and TColorPicker (Qiang) BUG: Ticket#85 - Undefined TDataGrid::setSelectedIndex (Qiang) BUG: Ticket#87 - Typo in IDbConnection (Qiang) +BUG: Ticket#88 - Unclosed HTML tag in TDatePicker and TColorPicker (Qiang) +BUG: Ticket#89 - TInlineFrame::ScrollBars wrong behaviour expected (Qiang) BUG: Ticket#95 - Typo in TTemplateControl::registerContentPlaceHolder (Qiang) BUG: Ticket#103 - Typo in TStyle::setVerticalAlign (Qiang) BUG: Ticket#107 - ListControls not respect parent disabling (Qiang) -BUG: SF#1446846 - Typo in THead (Qiang) BUG: SF#1432624 - Incorrect documentation about caching expiry (Qiang) +BUG: SF#1446846 - Typo in THead (Qiang) BUG: THttpSession fails when user storage module is used (Qiang) CHG: TTextHighlighter.EnableCopyCode defaults to false (Qiang) CHG: Reorganized quickstart tutorial demo, added new sections (Qiang) @@ -15,11 +16,11 @@ CHG: Reorganized folders under framework (Qiang) CHG: Modified THtmlArea default toolbar and size. (Qiang) ENH: Ticket#92 - Support for user exception message file (Qiang) ENH: Ticket#106 - Support for validation on THiddenField (Qiang) +ENH: Ticket#110 - Support for TVarDump with syntax highlight (Qiang) ENH: TDataFieldAccessor can access public class variables (Qiang) ENH: Pagers in TDataGrid are now enclosed within panels (Qiang) ENH: TPhpErrorException now shows the actual error lines (Qiang) -NEW: TSQLMap module (Wei) -NEW: TStack class (Qiang) +NEW: TStack component (Qiang) NEW: TImageMap control (Qiang) NEW: TWizard control (Qiang) NEW: TVarDumper and PradoBase::varDump() (Qiang) diff --git a/demos/quickstart/protected/pages/Controls/MultiView.page b/demos/quickstart/protected/pages/Controls/MultiView.page index 8c21bbf5..7e566181 100644 --- a/demos/quickstart/protected/pages/Controls/MultiView.page +++ b/demos/quickstart/protected/pages/Controls/MultiView.page @@ -3,4 +3,41 @@

TMultiView

+

+TMultiView serves as a container for a group of TView controls, which can be retrieved by the Views property. 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 ActiveView or ActiveViewIndex. Note, by default there is no active view. +

+

+To add a view to TMultiView, manipulate the Views collection or add it in template as follows, +

+ +<com:TMultiView> + <com:TView> + view 1 content + </com:TView> + <com:TView> + view 2 content + </com:TView> +</com:TMultiView> + + +

+TMultiView responds to the following command events to manage the visibility of its views. +

+ + +

+Upon postback, if the active view index is changed, TMultiView will raise an OnActiveViewChanged event. +

+ +

+The Hangman game is a typical use of TMultiView. The following example demonstrates another usage of TMultiView. +

+ + + \ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Standard.page b/demos/quickstart/protected/pages/Controls/Standard.page index 2b2eaf29..af4d6877 100644 --- a/demos/quickstart/protected/pages/Controls/Standard.page +++ b/demos/quickstart/protected/pages/Controls/Standard.page @@ -75,7 +75,7 @@ TLiteral represents a static text without any HTML tag surrounding it on a Web page. -
  • * +
  • TMultiView represents a container for a group of TView controls, each of which is container for other controls. At any time, at most one TView is visible.
  • diff --git a/framework/Web/UI/WebControls/TMultiView.php b/framework/Web/UI/WebControls/TMultiView.php index 5e9398f3..5f4f3d84 100644 --- a/framework/Web/UI/WebControls/TMultiView.php +++ b/framework/Web/UI/WebControls/TMultiView.php @@ -28,6 +28,9 @@ * - 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. + * * @author Qiang Xue * @version $Revision: $ $Date: $ * @package System.Web.UI.WebControls @@ -68,7 +71,7 @@ class TMultiView extends TControl } /** - * @return integer the zero-based index of the current view in the view collection. -1 if no active view. + * @return integer the zero-based index of the current view in the view collection. -1 if no active view. Default is -1. */ public function getActiveViewIndex() { @@ -184,7 +187,7 @@ class TMultiView extends TControl /** * Initializes the active view if any. * This method overrides the parent implementation. - * @param mixed event parameter + * @param TEventParameter event parameter */ public function onInit($param) { @@ -196,7 +199,7 @@ class TMultiView extends TControl /** * Raises OnActiveViewChanged event. * The event is raised when the currently active view is changed to a new one - * @param mixed event parameter + * @param TEventParameter event parameter */ public function onActiveViewChanged($param) { -- cgit v1.2.3