From 0daa38a4f5bb43d7332d681a98ccb693bc579230 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Thu, 2 Jun 2011 19:27:21 +0000 Subject: further documentation updates: everything else plus some things that were not even listed. Only T*RatingList has been left out --- .../pages/ActiveControls/ActiveDatePicker.page | 16 +++++++++ .../pages/ActiveControls/ActiveFileUpload.page | 33 +++++++++++++++++ .../pages/ActiveControls/ActiveHiddenField.page | 12 +++++++ .../ActiveControls/CallbackEventParameter.page | 26 ++++++++++++++ .../protected/pages/ActiveControls/Home.page | 36 +++++++++++++++---- .../pages/ActiveControls/InPlaceTextBox.page | 42 ++++++++++++++++++++++ .../Samples/TActiveDatePicker/Home.page | 17 +++++++++ .../Samples/TActiveDatePicker/Home.php | 11 ++++++ .../Samples/TActiveFileUpload/Home.page | 15 ++++++++ .../Samples/TActiveFileUpload/Home.php | 21 +++++++++++ .../Samples/TInPlaceTextBox/Home.page | 17 +++++++++ .../Samples/TInPlaceTextBox/Home.php | 11 ++++++ .../quickstart/protected/pages/Controls/List.page | 12 +++++++ .../protected/pages/Controls/Validation.page | 16 +++++++++ 14 files changed, 279 insertions(+), 6 deletions(-) create mode 100644 demos/quickstart/protected/pages/ActiveControls/ActiveDatePicker.page create mode 100644 demos/quickstart/protected/pages/ActiveControls/ActiveFileUpload.page create mode 100644 demos/quickstart/protected/pages/ActiveControls/ActiveHiddenField.page create mode 100644 demos/quickstart/protected/pages/ActiveControls/CallbackEventParameter.page create mode 100644 demos/quickstart/protected/pages/ActiveControls/InPlaceTextBox.page create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDatePicker/Home.page create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDatePicker/Home.php create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveFileUpload/Home.page create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TActiveFileUpload/Home.php create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TInPlaceTextBox/Home.page create mode 100644 demos/quickstart/protected/pages/ActiveControls/Samples/TInPlaceTextBox/Home.php (limited to 'demos/quickstart') diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveDatePicker.page b/demos/quickstart/protected/pages/ActiveControls/ActiveDatePicker.page new file mode 100644 index 00000000..774a84b3 --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/ActiveDatePicker.page @@ -0,0 +1,16 @@ + + +

TActiveDatePicker

+ + +

+TActiveDatePicker is the active control counter part to TDatePicker control. +When the date selection is changed, the OnCallback event is raised. +

+

+Please refer to the documentation of TDatePicker for further usage informations. +

+ + + +
$Id$
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveFileUpload.page b/demos/quickstart/protected/pages/ActiveControls/ActiveFileUpload.page new file mode 100644 index 00000000..8bdb7cfe --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/ActiveFileUpload.page @@ -0,0 +1,33 @@ + + +

TActiveFileUpload

+ + +

+TActiveFileUpload displays a file upload field on a page. Upon postback, +the text entered into the field will be treated as the name of the file +that will be uploaded to the server. The property HasFile +indicates whether the file upload is successful. If successful, the file +may be obtained by callingsaveAs to save it at a specified place. +You can use FileName, FileType, +FileSize to get the original client-side file name, +the file mime type, and the file size information. If the upload is not +successful, ErrorCode contains the error code +describing the cause of failure. +

+ +

+TActiveFileUpload raises OnFileUpload event if a file is uploaded +(whether it succeeds or not). +

+ +

+TActiveFileUpload actually does a postback in a hidden IFrame, and then does a callback. +This callback then raises the OnFileUpload event. After the postback +a status icon is displayed; either a green checkmark if the upload is successful, +or a red x if there was an error. +

+ + + +
$Id$
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveHiddenField.page b/demos/quickstart/protected/pages/ActiveControls/ActiveHiddenField.page new file mode 100644 index 00000000..00077b59 --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/ActiveHiddenField.page @@ -0,0 +1,12 @@ + + +

TActiveHiddenField

+ + +

+TActiveHiddenField is the active control counterpart of THiddenField component. +It displays a hidden input field on a Web page. The value of the input field can be accessed and changed +on callback via the Value property. +

+ +
$Id$
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/CallbackEventParameter.page b/demos/quickstart/protected/pages/ActiveControls/CallbackEventParameter.page new file mode 100644 index 00000000..e99a2d40 --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/CallbackEventParameter.page @@ -0,0 +1,26 @@ + + +

TCallbackEventParameter

+ + +

+TCallbackEventParameter provides the parameter passed during the callback +request in the CallbackParameter property. The +callback response content (e.g. new HTML content) must be rendered +using an THtmlWriter obtained from the NewWriter +property, which returns a NEW instance of TCallbackResponseWriter. +

+ +

+Each instance TCallbackResponseWriter is associated with a unique +boundary delimited. By default each panel only renders its own content. +To replace the content of ONE panel with that of rendered from multiple panels +use the same writer instance for the panels to be rendered. +

+ +

+The response data (i.e., passing results back to the client-side +callback handler function) can be set using ResponseData property. +

+ +
$Id$
\ 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 bb74c4bf..1a216db6 100644 --- a/demos/quickstart/protected/pages/ActiveControls/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Home.page @@ -17,8 +17,6 @@ of javascript classes. TActiveButton control. See also the later part of the Currency Converter tutorial for a more in depth example.

-

* the tutorial for this control is not completed yet.

-

Standard Active Controls

@@ -432,6 +451,11 @@ A Prado user can use them to customize active controls behaviour and interact di is used to specify client-side callback request options and client-side event handlers. +
  • + TCallbackEventParameter + provides the parameter passed during the callback request. +
  • +
  • TCallbackOptions allows a common set of callback client-side options to be attached to one or more active controls. diff --git a/demos/quickstart/protected/pages/ActiveControls/InPlaceTextBox.page b/demos/quickstart/protected/pages/ActiveControls/InPlaceTextBox.page new file mode 100644 index 00000000..2349d255 --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/InPlaceTextBox.page @@ -0,0 +1,42 @@ + + +

    TInPlaceTextBox

    + + +

    +TInPlaceTextBox is a component rendered as a label and allows its +contents to be edited by changing the label to a textbox when +the label is clicked or when another control or html element with +ID given by EditTriggerControlID is clicked. +

    + +

    +If the OnLoadingText event is handled, a callback request is +made when the label is clicked, while the request is being made the +textbox is disabled from editing. The OnLoadingText event allows +you to update the content of the textbox before the client is allowed +to edit the content. After the callback request returns successfully, +the textbox is enabled and the contents is then allowed to be edited. +

    + +

    +Once the textbox loses focus, if AutoPostBack +is true and the textbox content has changed, a callback request is made and +the OnTextChanged event is raised like that of the TActiveTextBox. +During the request, the textbox is disabled. +

    + +

    +After the callback request returns sucessfully, the textbox is enabled. +If the AutoHideTextBox property is true, then +the textbox will be hidden and the label is then shown. +

    + +

    +Since 3.1.2, you can set the ReadOnly property to make +the control not editable. This property can be also changed on callback +

    + + + +
    $Id$
    \ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDatePicker/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDatePicker/Home.page new file mode 100644 index 00000000..fba7ec45 --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDatePicker/Home.page @@ -0,0 +1,17 @@ + + +

    TActiveDatePicker Samples

    + + + + + + + + +
    Default TActiveDatePicker triggering a callback to a label + + +
    + +
    $Id$
    \ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDatePicker/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDatePicker/Home.php new file mode 100644 index 00000000..41f8359e --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveDatePicker/Home.php @@ -0,0 +1,11 @@ +label1->Text = date("r", $this->date1->TimeStamp); + } +} + +?> \ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveFileUpload/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveFileUpload/Home.page new file mode 100644 index 00000000..ac82e02e --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveFileUpload/Home.page @@ -0,0 +1,15 @@ + + +

    TActiveFileUpload Sample

    + +

    +Please choose a file to upload: +

    + + + +
    + + + +
    $Id$
    \ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveFileUpload/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveFileUpload/Home.php new file mode 100644 index 00000000..d5cf990a --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveFileUpload/Home.php @@ -0,0 +1,21 @@ +HasFile) + { + $this->Result->Text=" + You just uploaded a file: +
    + Name: {$sender->FileName} +
    + Size: {$sender->FileSize} +
    + Type: {$sender->FileType}"; + } + } +} + +?> \ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TInPlaceTextBox/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TInPlaceTextBox/Home.page new file mode 100644 index 00000000..cd55a432 --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TInPlaceTextBox/Home.page @@ -0,0 +1,17 @@ + + +

    TInPlaceTextBox Samples

    + + + + + +
    +An in-place textbox text updating a label when its text changes: + + +
    +
    + +
    $Id$
    \ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TInPlaceTextBox/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TInPlaceTextBox/Home.php new file mode 100644 index 00000000..5c132fd6 --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TInPlaceTextBox/Home.php @@ -0,0 +1,11 @@ +label1->Text=$this->txt1->Text; + } +} + +?> \ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/List.page b/demos/quickstart/protected/pages/Controls/List.page index c7505181..c68a477f 100644 --- a/demos/quickstart/protected/pages/Controls/List.page +++ b/demos/quickstart/protected/pages/Controls/List.page @@ -49,12 +49,14 @@ $listbox->dataBind();

    TListBox

    +

    TListBox displays a list box that allows single or multiple selection. Set the property SelectionMode as Single to make a single selection list box, and Multiple a multiple selection list box. The number of rows displayed in the box is specified via the Rows property value.

    TDropDownList

    +

    TDropDownList displays a dropdown list box that allows users to select a single option from a few prespecified ones.

    @@ -64,6 +66,7 @@ Since v3.1.1, TDropDownList starts to support prompt text (something li

    TCheckBoxList

    +

    TCheckBoxList displays a list of checkboxes on a Web page. The alignment of the text besides each checkbox can be specified TextAlign. The layout of the checkboxes can be controlled by the following properties:

    @@ -76,12 +79,14 @@ Since v3.1.1, TDropDownList starts to support prompt text (something li

    TRadioButtonList

    +

    TRadioButtonList is similar to TCheckBoxList in every aspect except that each TRadioButtonList displays a group of radiobuttons. Only one of the radiobuttions can be selected (TCheckBoxList allows multiple selections.)

    TBulletedList

    +

    TBulletedList displays items in a bullet format on a Web page. The style of the bullets can be specified by BulletStyle. When the style is CustomImage, the bullets are displayed as images, which is specified by BulletImageUrl.

    @@ -96,4 +101,11 @@ Since v3.1.1, TDropDownList starts to support prompt text (something li +

    TRatingList

    + + +

    +This is an EXPERIMENTAL class that displays clickable images that represent a TRadioButtonList. +

    +
    $Id$
    \ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Validation.page b/demos/quickstart/protected/pages/Controls/Validation.page index 74db7b07..cabb9371 100644 --- a/demos/quickstart/protected/pages/Controls/Validation.page +++ b/demos/quickstart/protected/pages/Controls/Validation.page @@ -34,6 +34,8 @@ Validators share a common set of properties, which are defined in the base class

    Prado Validation Controls

    TRequiredFieldValidator

    + +

    TRequiredFieldValidator ensures that the user enters some data in the specified input field. By default, TRequiredFieldValidator will check if the user input is empty or not. The validation fails if the input is empty. By setting InitialValue, the validator can check if the user input is different from InitialValue. If not, the validation fails.

    @@ -41,6 +43,8 @@ TRequiredFieldValidator ensures that the user enters some data in the specified

    TRegularExpressionValidator

    + +

    TRegularExpressionValidator verifies the user input against a regular pattern. The validation fails if the input does not match the pattern. The regular expression can be specified by the RegularExpression property. Some commonly used regular expressions include:

    @@ -65,6 +69,8 @@ Note, TRegularExpressionValidator only checks for nonempty user input. Use a TRe

    TEmailAddressValidator

    + +

    TEmailAddressValidator verifies that the user input is a valid email address. The validator uses a regular expression to check if the input is in a valid email address format. If CheckMXRecord is true, the validator will also check whether the MX record indicated by the email address is valid, provided checkdnsrr() is available in the installed PHP.

    @@ -75,6 +81,8 @@ Note, if the input being validated is empty, TEmailAddressValidator will not do

    TCompareValidator

    + +

    TCompareValidator compares the user input with a constant value specified by ValueToCompare, or another user input specified by ControlToCompare. The Operator property specifies how to compare the values, which includes Equal, NotEqual, GreaterThan, GreaterThanEqual, LessThan and LessThanEqual. Before comparison, the values being compared will be converted to the type specified by DataType listed as follows,

    @@ -94,6 +102,8 @@ Note, if the input being validated is empty, TEmailAddressValidator will not do

    TDataTypeValidator

    + +

    TDataTypeValidator verifies if the input data is of specific type indicated by DataType. The data types that can be checked against are the same as those in TCompareValidator.

    @@ -106,6 +116,8 @@ TDataTypeValidator verifies if the input data is of specific type indicated by <

    TRangeValidator

    + +

    TRangeValidator verifies whether an input value is within a specified range. TRangeValidator uses three key properties to perform its validation. The MinValue and MaxValue properties specify the minimum and maximum values of the valid range. The DataType property specifies the data type of the value being validated. The value will be first converted into the specified type and then compare with the valid range. The data types that can be checked against are the same as those in TCompareValidator.

    @@ -124,6 +136,8 @@ are compared as strictly less than the MaxValue and/or strictly greater

    TCustomValidator

    + +

    TCustomValidator performs user-defined validation (either server-side or client-side or both) on an input control.

    @@ -148,6 +162,8 @@ function ValidationFunctionName(sender, parameter)

    TValidationSummary

    + +

    TValidationSummary displays a summary of validation errors inline on a Web page, in a message box, or both.

    -- cgit v1.2.3