[ Index ] |
|
Code source de PRADO 3.0.6 |
1 <com:TContent ID="body" > 2 3 <h1 id="1901">Page Configurations</h1> 4 <p> 5 Page configurations are mainly used by <tt>TPageService</tt> 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 <tt>config.xml</tt>. 6 </p> 7 <p> 8 When a user requests a page stored under <tt><BasePath>/dir1/dir2</tt>, the <tt>TPageService</tt> will try to parse and load <tt>config.xml</tt> files under <tt><BasePath></tt>, <tt><BasePath>/dir1</tt> and <tt><BasePath>/dir1/dir2</tt>. Paths, modules, and parameters specified in these configuration files will be appended or merged into the existing application configuration. Here <tt><BasePath></tt> is as defined in <a href="?page=Fundamentals.Services">page service</a>. 9 </p> 10 <p> 11 The format of a page configuration file is as follows, 12 </p> 13 <com:TTextHighlighter Language="xml" CssClass="source"> 14 <configuration> 15 <paths> 16 <alias id="AliasID" path="AliasPath" /> 17 <using namespace="Namespace" /> 18 </paths> 19 <modules> 20 <module id="ModuleID" class="ModuleClass" PropertyName="PropertyValue" ... /> 21 </modules> 22 <authorization> 23 <allow pages="PageID1,PageID2" users="User1,User2" roles="Role1,Role2" verb="get" /> 24 <deny pages="PageID1,PageID2" users="User1,User2" roles="Role1,Role2" verb="post" /> 25 </authorization> 26 <pages PropertyName="PropertyValue" ...> 27 <page id="PageID" PropertyName="PropertyValue" ... /> 28 </pages> 29 <parameters> 30 <parameter id="ParameterID" class="ParameterClass" PropertyName="PropertyValue" ... /> 31 </parameters> 32 </configuration> 33 </com:TTextHighlighter> 34 <p> 35 The <tt><paths></tt>, <tt><modules></tt> and <tt><parameters></tt> are similar to those in an application configuration. The <tt><authorization></tt> 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 <tt><pages></tt> element specifies the initial values for the properties of pages. Each <tt><page></tt> element specifies the initial property values for a particular page identified by the <tt>id</tt> attribute. Initial property values given in the <tt><pages></tt> element apply to all pages in the current directory and all its subdirectories. 36 </p> 37 <p> 38 Complete specification of page configurations can be found in the <a href="<%~../../../../../docs/specs/config.dtd%>">DTD</a> and <a href="<%~../../../../../docs/specs/config.xsd%>">XSD</a> files. 39 </p> 40 41 </com:TContent>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 21:07:04 2007 | par Balluche grâce à PHPXref 0.7 |