diff options
author | wei <> | 2006-12-04 00:17:43 +0000 |
---|---|---|
committer | wei <> | 2006-12-04 00:17:43 +0000 |
commit | 91fe694c8755aa2d05743946a3681be7232420b6 (patch) | |
tree | 14d822b190fd729d141dbaa99cd26ed98e1b7940 | |
parent | 18ea316c553f7ccfc18b73f0c987de007f11b275 (diff) |
propage changes to OnError and OnSuccess for validators ClientSide.
6 files changed, 17 insertions, 16 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Validation.page b/demos/quickstart/protected/pages/Controls/Validation.page index 2405fb45..0e4006bb 100644 --- a/demos/quickstart/protected/pages/Controls/Validation.page +++ b/demos/quickstart/protected/pages/Controls/Validation.page @@ -156,8 +156,8 @@ The summary can be displayed as a list, a bulleted list, or a single paragraph b All validators contains the following events.
<ul>
<li>The <tt>OnValidate</tt> event is raise before the validator validation functions are called.</li>
- <li>The <tt>OnSuccess</tt> event is raised after the validator has successfully validate the control.</li>
- <li>The <tt>OnError</tt> event is raised after the validator fails validation.</li>
+ <li>The <tt>OnValidationSuccess</tt> event is raised after the validator has successfully validate the control.</li>
+ <li>The <tt>OnValidationError</tt> event is raised after the validator fails validation.</li>
</ul>
The corresponding events for the client side is available as sub-properties
of the <tt>ClientSide</tt> property of the validator.
@@ -165,9 +165,9 @@ The summary can be displayed as a list, a bulleted list, or a single paragraph b <p>The following example pop-up a message saying "hello" when the validator fails on the client-side.
<com:TTextHighlighter Language="prado" CssClass="source">
<com:TRequiredFieldValidator ... >
- <prop:ClientSide.OnError>
+ <prop:ClientSide.OnValidationError>
alert("hello");
- </prop:ClientSide.OnError>
+ </prop:ClientSide.OnValidationError>
</com:TRequiredFieldValidator>
</com:TTextHighlighter>
The resulting client-side event callback function is of the following form.
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page index 5d7f451b..fdd4a604 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page @@ -2,8 +2,8 @@ <com:TForm>
<com:TActiveButton ID="button1"
- ClientSide.RequestTimeOut="3000"
- Text="Click Me!" OnCallback="button1_oncallback" />
+ CustomData="0"
+ Text="Click Me!" OnClick="button1_oncallback" />
<com:TActiveLabel ID="label1" />
<com:TActiveRatingList RepeatColumns="2" RepeatDirection="Vertical">
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php index abb6c8c8..4a488107 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php @@ -4,8 +4,9 @@ class PageStateTest extends TPage {
function button1_oncallback($sender, $param)
{
- sleep(rand(0,5));
- $this->label1->Text .= " button1 clicked ";
+ //sleep(rand(0,5));
+ $sender->CustomData = $sender->CustomData + 1;
+ $this->label1->Text = " button1 clicked ".$sender->CustomData." times";
}
}
diff --git a/tests/FunctionalTests/features/protected/pages/ValidatorEffects.page b/tests/FunctionalTests/features/protected/pages/ValidatorEffects.page index e01b542e..78c66365 100644 --- a/tests/FunctionalTests/features/protected/pages/ValidatorEffects.page +++ b/tests/FunctionalTests/features/protected/pages/ValidatorEffects.page @@ -16,13 +16,13 @@ ControlCssClass="required"
Display="Dynamic"
ErrorMessage="a username is required.">
- <prop:ClientSide.OnError>
+ <prop:ClientSide.OnValidationError>
Effect.Shake(sender.control);
Effect.Appear(sender.message);
- </prop:ClientSide.OnError>
- <prop:ClientSide.OnSuccess>
+ </prop:ClientSide.OnValidationError>
+ <prop:ClientSide.OnValidationSuccess>
Effect.Fade(sender.message);
- </prop:ClientSide.OnSuccess>
+ </prop:ClientSide.OnValidationSuccess>
</com:TRequiredFieldValidator>
</div>
<div class="password">
@@ -37,8 +37,8 @@ ValidationGroup="registration"
ControlCssClass="required"
Display="Dynamic"
- ClientSide.OnError="sender.message.visualEffect('appear')"
- ClientSide.OnSuccess="sender.message.visualEffect('fade')"
+ ClientSide.OnValidationError="sender.message.visualEffect('appear')"
+ ClientSide.OnValidationSuccess="sender.message.visualEffect('fade')"
ErrorMessage="a password is required." />
</div>
<div class="create">
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket205.page b/tests/FunctionalTests/tickets/protected/pages/Ticket205.page index 5735b22a..376f97f7 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket205.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket205.page @@ -1,5 +1,5 @@ <com:TContent ID="Content"> - <h3>TCustomValidator not enabling ControlCssClass or prop:ClientSide.OnError after postback.</h3> + <h3>TCustomValidator not enabling ControlCssClass or prop:ClientSide.OnValidationError after postback.</h3> <style> .required { diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket207.page b/tests/FunctionalTests/tickets/protected/pages/Ticket207.page index 594d512b..6c84d953 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket207.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket207.page @@ -1,5 +1,5 @@ <com:TContent ID="Content"> - <h2>Validators ClientSide.OnError triggered twice</h2> + <h2>Validators ClientSide.OnValidationError triggered twice</h2> <h3>Use ClientSide.ObseveChanges="false"</h3> <com:TTextBox ID="text1" /><br /> <com:TRequiredFieldValidator |