summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-06-01 21:15:07 +0000
committerctrlaltca@gmail.com <>2011-06-01 21:15:07 +0000
commit71df3f52602b3cda5a443079f81be75eeb9e96db (patch)
treec08972e905c4819e2a8f8601ccb11cafbaaa6e08
parent05879b19350009f9d9c9db6868b38619d3cb4bdc (diff)
added documentation for TActiveTextBox class
-rw-r--r--.gitattributes3
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/ActiveTextBox.page15
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Home.page8
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTextBox/Home.page31
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTextBox/Home.php16
-rw-r--r--framework/Web/UI/ActiveControls/TActiveTextBox.php4
6 files changed, 71 insertions, 6 deletions
diff --git a/.gitattributes b/.gitattributes
index c08daf94..b8a29ee8 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1279,6 +1279,7 @@ demos/quickstart/protected/pages/ActiveControls/ActiveImage.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveImageButton.page -text
demos/quickstart/protected/pages/ActiveControls/ActiveLabel.page -text
demos/quickstart/protected/pages/ActiveControls/ActivePager.page -text
+demos/quickstart/protected/pages/ActiveControls/ActiveTextBox.page -text
demos/quickstart/protected/pages/ActiveControls/AutoComplete.page -text
demos/quickstart/protected/pages/ActiveControls/DragDrop.page -text
demos/quickstart/protected/pages/ActiveControls/Home.page -text
@@ -1307,6 +1308,8 @@ demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImageButton/hello
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveLabel/Home.page -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActiveLabel/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TActivePager/Home.page -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTextBox/Home.page -text
+demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTextBox/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/TAutoComplete/Home.page -text
demos/quickstart/protected/pages/ActiveControls/Samples/TAutoComplete/Home.php -text
demos/quickstart/protected/pages/ActiveControls/Samples/config.xml -text
diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveTextBox.page b/demos/quickstart/protected/pages/ActiveControls/ActiveTextBox.page
new file mode 100644
index 00000000..9a508e32
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/ActiveTextBox.page
@@ -0,0 +1,15 @@
+<com:TContent ID="body" >
+
+<h1>TActiveTextBox</h1>
+<com:DocLink ClassPath="System.Web.UI.ActiveControls.TActiveTextBox" />
+
+<p class="block-content">
+<tt>TActiveTextBox</tt> is the active control counterpart of <tt>TTextBox</tt> component.
+<tt>TActiveTextBox</tt> allows the <tt>Text</tt> property of the textbox to
+be changed during callback. When <tt>AutoPostBack</tt> property
+is true, changes to the textbox contents will perform a callback request causing
+<tt>OnTextChanged</tt> to be fired first followed by <tt>OnCallback</tt> event.
+</p>
+<com:RunBar PagePath="ActiveControls.Samples.TActiveTextBox.Home" />
+
+<div class="last-modified">$Id$</div></com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Home.page b/demos/quickstart/protected/pages/ActiveControls/Home.page
index 7e0e551a..110d0660 100644
--- a/demos/quickstart/protected/pages/ActiveControls/Home.page
+++ b/demos/quickstart/protected/pages/ActiveControls/Home.page
@@ -91,10 +91,10 @@ TActiveButton</a> control. See also the later part of the <a href="?page=Tutoria
</li>
<li>
- * <a href="?page=ActiveControls.ActiveTextBox">TActiveTextBox</a>
- represents a text input field on a Web page.
- It can collect single-line, multi-line or password text input from users.
- It can be used to perform a callback request.
+ <a href="?page=ActiveControls.ActiveTextBox">TActiveTextBox</a>
+ represents a text input field on a Web page.
+ It can collect single-line, multi-line or password text input from users.
+ It can be used to perform a callback request.
</li>
<li>
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTextBox/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTextBox/Home.page
new file mode 100644
index 00000000..b4ea8afc
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTextBox/Home.page
@@ -0,0 +1,31 @@
+<com:TContent ID="body">
+
+<h1>TActiveTextBox Samples</h1>
+
+<table class="sampletable">
+
+<tr><td class="samplenote">
+An active textbox being set as the result of a callback:
+</td><td class="sampleaction">
+<com:TActiveTextBox Text="Sample content" ID="txt1"
+/>
+
+<com:TActiveButton
+ Text="click me"
+ OnClick="buttonClicked"
+/>
+</td></tr>
+
+<tr><td class="samplenote">
+An active textbox with AutoPostBack="true"; Pressing Enter/Return, the textbox contents will be set on the label.
+Note that text needs to be properly escaped to avoid html injections:
+</td><td class="sampleaction">
+<com:TActiveTextBox ID="txt2" AutoPostBack="true" OnTextChanged="textChanged"
+/>
+<com:TActiveLabel Text="" ID="label2"
+/>
+</td></tr>
+
+</table>
+
+<div class="last-modified">$Id: Home.page 2946 2011-06-01 21:01:57Z ctrlaltca@gmail.com $</div></com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTextBox/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTextBox/Home.php
new file mode 100644
index 00000000..1993b78d
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTextBox/Home.php
@@ -0,0 +1,16 @@
+<?php
+
+class Home extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ $this->txt1->Text="You clicked the button, didn't you?";
+ }
+
+ public function textChanged($sender,$param)
+ {
+ $this->label2->Text=THttpUtility::htmlEncode($this->txt2->Text);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/framework/Web/UI/ActiveControls/TActiveTextBox.php b/framework/Web/UI/ActiveControls/TActiveTextBox.php
index 97efe008..63f5e191 100644
--- a/framework/Web/UI/ActiveControls/TActiveTextBox.php
+++ b/framework/Web/UI/ActiveControls/TActiveTextBox.php
@@ -4,7 +4,7 @@
*
* @author Wei Zhuo <weizhuo[at]gamil[dot]com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2008 PradoSoft
+ * @copyright Copyright &copy; 2005-2008 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Web.UI.ActiveControls
@@ -21,7 +21,7 @@ Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter');
* TActiveTextBox allows the {@link setText Text} property of the textbox to
* be changed during callback. When {@link setAutoPostBack AutoPostBack} property
* is true, changes to the textbox contents will perform a callback request causing
- * {@link onTextChanged OnTextChange} to be fired first followed by {@link onCallback OnCallback}
+ * {@link onTextChanged OnTextChanged} to be fired first followed by {@link onCallback OnCallback}
* event.
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>