From 6ea993425cc0982ecef765d4bfc6b75b7206416d Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 28 Dec 2005 13:11:07 +0000 Subject: --- .../protected/pages/Configurations/AppConfig.page | 14 +++++++------- .../protected/pages/Configurations/PageConfig.page | 6 +++--- .../protected/pages/Configurations/Templates1.page | 12 ++++++------ .../protected/pages/Configurations/Templates2.page | 8 ++++---- .../protected/pages/Configurations/Templates3.page | 8 ++++---- 5 files changed, 24 insertions(+), 24 deletions(-) (limited to 'demos/quickstart/protected/pages/Configurations') diff --git a/demos/quickstart/protected/pages/Configurations/AppConfig.page b/demos/quickstart/protected/pages/Configurations/AppConfig.page index dc4675f1..101e449c 100644 --- a/demos/quickstart/protected/pages/Configurations/AppConfig.page +++ b/demos/quickstart/protected/pages/Configurations/AppConfig.page @@ -5,7 +5,7 @@ Application configurations are used to specify the global behavior of an application. They include specification of path aliases, namespace usages, module and service configurations, and parameters.

-Configuration for an application is stored in an XML file named application.xml, which should be located under the application base path. Its format is shown in the following, +Configuration for an application is stored in an XML file named application.xml, which should be located under the application base path. Its format is shown in the following,

 <application PropertyName="PropertyValue" ...>
   <paths>
@@ -24,17 +24,17 @@ Configuration for an application is stored in an XML file named applicatio
 </application>
 
-By default without explicit configuration, a PRADO application when running will load a few core modules, such as THttpRequest, THttpResponse, etc. It will also provide the TPageService as a default service. Configuration and usage of these modules and services are covered in individual sections of this tutorial. Note, if your application takes default settings for these modules and service, you do not need to provide an application configuration. However, if these modules or services are not sufficient, or you want to change their behavior by configuring their property values, you will need an application configuration. +By default without explicit configuration, a PRADO application when running will load a few core modules, such as THttpRequest, THttpResponse, etc. It will also provide the TPageService as a default service. Configuration and usage of these modules and services are covered in individual sections of this tutorial. Note, if your application takes default settings for these modules and service, you do not need to provide an application configuration. However, if these modules or services are not sufficient, or you want to change their behavior by configuring their property values, you will need an application configuration.

\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Configurations/PageConfig.page b/demos/quickstart/protected/pages/Configurations/PageConfig.page index e6a6afaf..a7d0ef8e 100644 --- a/demos/quickstart/protected/pages/Configurations/PageConfig.page +++ b/demos/quickstart/protected/pages/Configurations/PageConfig.page @@ -2,10 +2,10 @@

Page Configurations

-Page configurations are mainly used by TPageService to modify or append the application configuration. As the name indicates, a page configuration is associated with a directory storing some page files. It is stored as an XML file named config.xml. +Page configurations are mainly used by TPageService to modify or append the application configuration. As the name indicates, a page configuration is associated with a directory storing some page files. It is stored as an XML file named config.xml.

-When a user requests a page stored under <BasePath>/dir1/dir2, the TPageService will try to parse and load config.xml files under <BasePath>/dir1 and <BasePath>/dir1/dir2. Paths, modules, and parameters specified in these configuration files will be appended or merged into the existing application configuration. +When a user requests a page stored under <BasePath>/dir1/dir2, the TPageService will try to parse and load config.xml files under <BasePath>/dir1 and <BasePath>/dir1/dir2. Paths, modules, and parameters specified in these configuration files will be appended or merged into the existing application configuration.

The format of a page configuration file is as follows, @@ -30,7 +30,7 @@ The format of a page configuration file is as follows, </parameters> </configuration> -The <paths>, <modules> and <parameters> are similar to those in an application configuration. The <authorization> specifies the authorization rules that apply to the current page directory and all its subdirectories. It will be explained in more detail in future sections. The <pages> element specifies the initial values for the properties of pages. Each <page> element specifies the initial property values for a particular page identified by the id<pages> element apply to all pages in the current directory and all its subdirectories. +The <paths>, <modules> and <parameters> are similar to those in an application configuration. The <authorization> specifies the authorization rules that apply to the current page directory and all its subdirectories. It will be explained in more detail in future sections. The <pages> element specifies the initial values for the properties of pages. Each <page> element specifies the initial property values for a particular page identified by the id<pages> element apply to all pages in the current directory and all its subdirectories.

\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Configurations/Templates1.page b/demos/quickstart/protected/pages/Configurations/Templates1.page index c406cfad..5d387e14 100644 --- a/demos/quickstart/protected/pages/Configurations/Templates1.page +++ b/demos/quickstart/protected/pages/Configurations/Templates1.page @@ -1,7 +1,7 @@

Templates: Part I

-Templates are used to specify the presentational layout of controls. A template can contain static text, components, or controls that contribute to the ultimate presentation of the associated control. By default, an instance of TTemplateControl or its subclass may automatically load a template from a file whose name is the same as the control class name. For page templates, the file name suffix must be .page; for other regular template controls, the suffix is .tpl. +Templates are used to specify the presentational layout of controls. A template can contain static text, components, or controls that contribute to the ultimate presentation of the associated control. By default, an instance of TTemplateControl or its subclass may automatically load a template from a file whose name is the same as the control class name. For page templates, the file name suffix must be .page; for other regular template controls, the suffix is .tpl.

The template format is like HTML, with a few PRADO-specifc tags, including component tags, template control tags, comment tags, dynamic content tags, and dynamic property tags. .

@@ -18,10 +18,10 @@ The format of a component tag is as follows, body content </com:ComponentType> -ComponentType can be either the class name or the dotted type name (e.g. System.Web.UI.TControl) of the component. PropertyName and EventName are both case-insensitive. PropertyName can be a property or subproperty name (e.g. Font.Name). Note, PropertyValue will be HTML-decoded when assigned to the corresponding property. Content enclosed between the opening and closing component tag are normally treated the body of the component. +ComponentType can be either the class name or the dotted type name (e.g. System.Web.UI.TControl) of the component. PropertyName and EventName are both case-insensitive. PropertyName can be a property or subproperty name (e.g. Font.Name). Note, PropertyValue will be HTML-decoded when assigned to the corresponding property. Content enclosed between the opening and closing component tag are normally treated the body of the component.

-It is required that component tags nest properly with each other and an opening component tag be paired with a closing tag, similar to that in XML. The following shows a component tag specifying the Text property and Click event of a button control, +It is required that component tags nest properly with each other and an opening component tag be paired with a closing tag, similar to that in XML. The following shows a component tag specifying the Text property and Click event of a button control,

 <com:TButton Text="Register" Click="registerUser" />
 
@@ -33,7 +33,7 @@ To deal conveniently with properties taking take big trunk of initial data, the PropertyValue </prop:PropertyName> -It is equivalent to ...PropertyName="PropertyValue"... in a component tag. Property initialization tags must be directly enclosed between the corresponding opening and closing component tag. +It is equivalent to ...PropertyName="PropertyValue"... in a component tag. Property initialization tags must be directly enclosed between the corresponding opening and closing component tag.

@@ -42,10 +42,10 @@ A template control tag is used to configure the initial property values of the c
 <%@ PropertyName="PropertyValue" ... %>
 
-Like in component tags, PropertyName is case-insensitive and can be a property or subproperty name. +Like in component tags, PropertyName is case-insensitive and can be a property or subproperty name.

-Initial values specified via the template control tag are assigned to the corresponding properties when the template control is being constructed. Therefore, you may override these property values in a later stage, such as the Init stage of the control. +Initial values specified via the template control tag are assigned to the corresponding properties when the template control is being constructed. Therefore, you may override these property values in a later stage, such as the Init stage of the control.

Template control tag is optional in a template. Each template can contain at most one template control tag. You can place the template control tag anywhere in the template. It is recommended that you place it at the beginning of the template for better visibility. diff --git a/demos/quickstart/protected/pages/Configurations/Templates2.page b/demos/quickstart/protected/pages/Configurations/Templates2.page index b7eaaf7a..c4528a0b 100644 --- a/demos/quickstart/protected/pages/Configurations/Templates2.page +++ b/demos/quickstart/protected/pages/Configurations/Templates2.page @@ -14,7 +14,7 @@ An expression tag represents a PHP expression that is evaluated when the templat

 <%= PhpExpression %>
 
-Inernally, an expression tag is represented by a TExpression control. Therefore, in the expression $this refers to the TExpression control. For example, the following expression tag will display the current page title at the place, +Inernally, an expression tag is represented by a TExpression control. Therefore, in the expression $this refers to the TExpression control. For example, the following expression tag will display the current page title at the place,
 <%= $this->Page->Title %>
 
@@ -23,7 +23,7 @@ Inernally, an expression tag is represented by a TExpression contro

Statement Tags

-Statement tags are similar to expression tags, except that statement tags contain PHP statements rather than expressions. The output of the PHP statements (using for example echo or print in PHP) are displayed at the place where the statement tag resides in the template. Inernally, a statement tag is represented by a TStatements control. Therefore, in the statements $this refers to the TStatements control. The format of statement tags is as follows, +Statement tags are similar to expression tags, except that statement tags contain PHP statements rather than expressions. The output of the PHP statements (using for example echo or print in PHP) are displayed at the place where the statement tag resides in the template. Inernally, a statement tag is represented by a TStatements control. Therefore, in the statements $this refers to the TStatements control. The format of statement tags is as follows,

 <%%
 PHP Statements
@@ -43,7 +43,7 @@ echo strftime("%A %e %B %Y",time());
 
 

Databind Tags

-Databind tags are similar to expression tags, except that the expressions are evaluated only when a dataBind() call is invoked on the controls representing the databind tags. Internally, a TLiteral control is used to represent a databind tag and $this in the expression would refer to the control. The format of databind tags is as follows, +Databind tags are similar to expression tags, except that the expressions are evaluated only when a dataBind() call is invoked on the controls representing the databind tags. Internally, a TLiteral control is used to represent a databind tag and $this in the expression would refer to the control. The format of databind tags is as follows,

 <%# PhpExpression %>
 
@@ -69,7 +69,7 @@ The format of asset tags is as follows,
 <%~ LocalFileName %>
 
-where LocalFileName refers to a file path that is relative to the directory containing the current template file. The file path can be a single file or a directory. If the latter, the content in the whole directory will be made accessible by end-users. +where LocalFileName refers to a file path that is relative to the directory containing the current template file. The file path can be a single file or a directory. If the latter, the content in the whole directory will be made accessible by end-users.

BE VERY CAUTIOUS when you are using asset tags as it may expose to end-users files that you probably do not want them to see. diff --git a/demos/quickstart/protected/pages/Configurations/Templates3.page b/demos/quickstart/protected/pages/Configurations/Templates3.page index 328687fb..7ab55281 100644 --- a/demos/quickstart/protected/pages/Configurations/Templates3.page +++ b/demos/quickstart/protected/pages/Configurations/Templates3.page @@ -10,7 +10,7 @@ Dynamic property tags are very similar to dynamic content tags, except that they body content </com:ComponentType>

-where you may enclose DynamicPropertyTag within single or double quotes for better readability. +where you may enclose DynamicPropertyTag within single or double quotes for better readability.

We now introduce the available types of dynamic property tags that may be used in the above. Like dynamic content tags, we have expression tags, databind tags, parameter tags and asset tags. (Note, there is no statement tag here.) @@ -23,7 +23,7 @@ An expression tag represents a PHP expression that is evaluated when the templat

 <%= PhpExpression %>
 
-In the expression, $this refers to the component specified by the component tag. The following example specifies a TLabel control whose Text property is initialized as the current page title when the TLabel control is being constructed, +In the expression, $this refers to the component specified by the component tag. The following example specifies a TLabel control whose Text property is initialized as the current page title when the TLabel control is being constructed,
 <com:TLabel Text=<%= $this->Page->Title %> />
 
@@ -35,7 +35,7 @@ Note, unlike dynamic content tags, the expressions tags for component properties

Databind Tags

-Databind tags are similar to expression tags, except that the expressions are evaluated only when a dataBind() call is invoked on the controls represented by the component tags. In the expression, $this refers to the control itself. Databind tags do not apply to all components. They can only be used for controls. +Databind tags are similar to expression tags, except that the expressions are evaluated only when a dataBind() call is invoked on the controls represented by the component tags. In the expression, $this refers to the control itself. Databind tags do not apply to all components. They can only be used for controls.

The format of databind tags is as follows, @@ -64,7 +64,7 @@ The format of asset tags is as follows,

 <%~ LocalFileName %>
 
-where LocalFileName refers to a file path that is relative to the directory containing the current template file. The file path can be a single file or a directory. If the latter, the content in the whole directory will be made accessible by end-users. +where LocalFileName refers to a file path that is relative to the directory containing the current template file. The file path can be a single file or a directory. If the latter, the content in the whole directory will be made accessible by end-users.

BE VERY CAUTIOUS when you are using asset tags as it may expose to end-users files that you probably do not want them to see. -- cgit v1.2.3