summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY9
-rw-r--r--demos/quickstart/protected/pages/Controls/MultiView.page37
-rw-r--r--demos/quickstart/protected/pages/Controls/Standard.page2
-rw-r--r--framework/Web/UI/WebControls/TMultiView.php9
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 @@
<h1>TMultiView</h1>
<com:DocLink ClassPath="System.Web.UI.WebControls.TMultiView" />
+<p>
+<tt>TMultiView</tt> serves as a container for a group of <tt>TView</tt> controls, which can be retrieved by the <tt>Views</tt> property. Each view contains child controls. <tt>TMultiView</tt> determines which view and its child controls are visible. At any time, at most one view is visible (called <i>active</i>). To make a view active, set <tt>ActiveView</tt> or <tt>ActiveViewIndex</tt>. Note, by default there is no active view.
+</p>
+<p>
+To add a view to <tt>TMultiView</tt>, manipulate the <tt>Views</tt> collection or add it in template as follows,
+</p>
+<com:TTextHighlighter Language="prado" CssClass="source">
+&lt;com:TMultiView&gt;
+ &lt;com:TView&gt;
+ view 1 content
+ &lt;/com:TView&gt;
+ &lt;com:TView&gt;
+ view 2 content
+ &lt;/com:TView&gt;
+&lt;/com:TMultiView&gt;
+</com:TTextHighlighter>
+
+<p>
+<tt>TMultiView</tt> responds to the following command events to manage the visibility of its views.
+</p>
+<ul>
+ <li><tt>NextView</tt> : switch to the next view (with respect to the currently active view).
+ <li><tt>PreviousView</tt> : switch to the previous view (with respect to the currently active view).
+ <li><tt>SwitchViewID</tt> : switch to a view by its ID path. The ID path is fetched from the command parameter.
+ <li><tt>SwitchViewIndex</tt> : switch to a view by its zero-based index in the <tt>Views</tt> collection. The index is fetched from the command parameter.
+</ul>
+
+<p>
+Upon postback, if the active view index is changed, <tt>TMultiView</tt> will raise an <tt>OnActiveViewChanged</tt> event.
+</p>
+
+<p>
+The <a href="?page=Fundamentals.Samples.Hangman.Home">Hangman game</a> is a typical use of <tt>TMultiView</tt>. The following example demonstrates another usage of <tt>TMultiView</tt>.
+</p>
+
+<com:RunBar PagePath="Controls.Samples.TMultiView.Home" />
+
</com:TContent> \ 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 @@
<a href="?page=Controls.Literal">TLiteral</a> represents a static text without any HTML tag surrounding it on a Web page.
</li>
- <li>*
+ <li>
<a href="?page=Controls.MultiView">TMultiView</a> represents a container for a group of <tt>TView</tt> controls, each of which is container for other controls. At any time, at most one <tt>TView</tt> is visible.
</li>
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 <qiang.xue@gmail.com>
* @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 <b>OnActiveViewChanged</b> 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)
{