diff options
author | wei <> | 2006-09-13 23:33:41 +0000 |
---|---|---|
committer | wei <> | 2006-09-13 23:33:41 +0000 |
commit | 9f2905f5e2a6d0ab33e4e2d82162183cfd63a042 (patch) | |
tree | 19ac593839f1003ef91d8b4a0d7e8e25fbf460e3 /demos/quickstart/protected | |
parent | 348fb25264f6cc9251f5ae9cb8c7a8a1013e2d67 (diff) |
Fixed #376
Diffstat (limited to 'demos/quickstart/protected')
4 files changed, 59 insertions, 3 deletions
diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveCustomValidator.page b/demos/quickstart/protected/pages/ActiveControls/ActiveCustomValidator.page new file mode 100644 index 00000000..f97ea40d --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/ActiveCustomValidator.page @@ -0,0 +1,23 @@ +<com:TContent ID="body">
+<!-- $Id: ActiveCheckBox.page 1405 2006-09-10 01:03:56Z wei $ -->
+<h1>TActiveCustomValidator</h1>
+<com:DocLink ClassPath="System.Web.UI.ActiveControls.TActiveCustomValidator" />
+
+<p>Performs custom validation using only server-side <tt>OnServerValidate</tt>
+ validation event. The client-side uses callbacks to raise
+ <tt>onServerValidate</tt> event. The <tt>ClientValidationFunction</tt> property
+ is disabled and will throw an exception if trying to set this property.
+</p>
+
+<p> Beware that the <tt>onServerValidate</tt> may be
+raised when the control to validate on the client side
+changes value, that is, the server validation may be called many times.
+
+After the callback or postback, the {@link onServerValidate onServerValidate}
+is raised once more. The <tt>IsCallback</tt> property of the <tt>TPage</tt> class
+will be true when validation is made during a callback request.
+</p>
+
+<com:RunBar PagePath="ActiveControls.Samples.TActiveCustomValidator.Home" />
+
+</com:TContent>
diff --git a/demos/quickstart/protected/pages/ActiveControls/Home.page b/demos/quickstart/protected/pages/ActiveControls/Home.page index 9b9e3067..eabb62c9 100644 --- a/demos/quickstart/protected/pages/ActiveControls/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Home.page @@ -32,7 +32,7 @@ TActiveButton</a> control.</p> </li>
<li>
- * <a href="?page=ActiveControls.ActiveCustomValidator">TActiveCustomValidator</a>
+ <a href="?page=ActiveControls.ActiveCustomValidator">TActiveCustomValidator</a>
validates a particular control using a callback request.
</li>
@@ -86,7 +86,7 @@ TActiveButton</a> control.</p> <li>
* <a href="?page=ActiveControls.CallbackOptions">TCallbackOptions</a>
- callback options such as <tt>OnLoading</tt/> client-side event handlers.
+ callback options such as <tt>OnLoading</tt> client-side event handlers.
</li>
</ul>
@@ -159,7 +159,7 @@ TActiveButton</a> control.</p> <h2>Active Control Abilities</h2>
-<!-- tabular: align=|l|l|l|, width=(0.55 0.15 0.15 0.15) -->
+<!-- tabular: align=|l|l|l|l|, width=(0.35 0.15 0.15 0.15) -->
<table class="tabular">
<tr>
<th>Control Name</th>
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.page new file mode 100644 index 00000000..8d5cb24d --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.page @@ -0,0 +1,22 @@ +<com:TContent ID="body">
+<!-- $Id: Home.page 1405 2006-09-10 01:03:56Z wei $ -->
+<h1>TActiveCustomValidator Samples (AJAX)</h1>
+
+<table class="sampletable">
+
+<tr><td class="samplenote">
+Custom validator using callbacks:
+</td><td class="sampleaction">
+<com:TTextBox ID="textbox1" />
+<com:TActiveCustomValidator
+ ID="validator1"
+ ControlToValidate="textbox1"
+ ErrorMessage="Please enter 'Prado'"
+ OnServerValidate="validator1_onvalidate" />
+<com:TButton ID="button1" Text="Submit!" />
+</td></tr>
+</table>
+
+<com:TJavascriptLogger />
+
+</com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.php new file mode 100644 index 00000000..102afcb0 --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.php @@ -0,0 +1,11 @@ +<?php
+
+class Home extends TPage
+{
+ public function validator1_onvalidate($sender, $param)
+ {
+ $param->IsValid = $this->textbox1->Text == 'Prado';
+ }
+}
+
+?>
\ No newline at end of file |