From 9f2905f5e2a6d0ab33e4e2d82162183cfd63a042 Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 13 Sep 2006 23:33:41 +0000 Subject: Fixed #376 --- .../ActiveControls/ActiveCustomValidator.page | 23 ++++++++++++++++++++++ .../protected/pages/ActiveControls/Home.page | 6 +++--- .../Samples/TActiveCustomValidator/Home.page | 22 +++++++++++++++++++++ .../Samples/TActiveCustomValidator/Home.php | 11 +++++++++++ 4 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 demos/quickstart/protected/pages/ActiveControls/ActiveCustomValidator.page create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.page create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.php (limited to 'demos/quickstart/protected/pages/ActiveControls') 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 @@ + + +

TActiveCustomValidator

+ + +

Performs custom validation using only server-side OnServerValidate + validation event. The client-side uses callbacks to raise + onServerValidate event. The ClientValidationFunction property + is disabled and will throw an exception if trying to set this property. +

+ +

Beware that the onServerValidate 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 IsCallback property of the TPage class +will be true when validation is made during a callback request. +

+ + + +
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 control.

  • - * TActiveCustomValidator + TActiveCustomValidator validates a particular control using a callback request.
  • @@ -86,7 +86,7 @@ TActiveButton control.

  • * TCallbackOptions - callback options such as OnLoading client-side event handlers. + callback options such as OnLoading client-side event handlers.
  • @@ -159,7 +159,7 @@ TActiveButton control.

    Active Control Abilities

    - + 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 @@ + + +

    TActiveCustomValidator Samples (AJAX)

    + +
    Control Name
    + + +
    +Custom validator using callbacks: + + + + +
    + + + + \ 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 @@ +IsValid = $this->textbox1->Text == 'Prado'; + } +} + +?> \ No newline at end of file -- cgit v1.2.3