1. 页面\组件配置(xxx.application)

    1. Engine对象

      所有请求\响应的控制对象,该Engine对象是存储在Session里的一个对象,可扩展

      <application name="demo" engine-class="com.ailk.web.BaseEngine">
      
    2. Visit对象

      一般是一个POJO,多用来存储Session里的信息

      <property name="org.apache.tapestry.visit-class">com.ailk.common.data.impl.Visit</property>
      
    3. 注入页面

      所有注入的页面才能通过URL访问,URL访问格式:http://[ip]:[port]/[contextroot]/[servlet]?service=page/XXX,XXX为注入的页面名称

      注:页面的name值必须唯一“Home”页面为默认的访问页面

      <page name="Home" specification-path="/desktop/Home.page" version="1212"/>
      
    4. 注入组件包

      组件包的ID属性必须唯一,在HTML里使用某组件包的格式如下:jwcid="@demo:XXXX",XXX为定义在demo.library里的组件名

      注:页面的name值必须唯一“Home”页面为默认的访问页面

      <library id="demo" specification-path="/com/ailk/demo/view/components/demo.library"/>
      
    5. 注入组件

      组件都是定义在后缀为*.library里的,其中type属性必须唯一,格式如下

      注:页面的name值必须唯一“Home”页面为默认的访问页面

      <component-type type="DynamicTable" specification-path="DynamicTable.jwc"/>
      
    6. 完整配置示例

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE application PUBLIC
      	"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
      	"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd"[
      ]>
      <application name="demo" engine-class="com.ailk.web.BaseEngine">
      	<description>Demo Application</description>
      
      	<property name="org.apache.tapestry.disable-caching" value="true"/>
      	<property name="org.apache.tapestry.enable-reset-service" value="true"/>
      	<property name="org.apache.tapestry.template-encoding" value="UTF-8"/>
      	<property name="org.apache.tapestry.output-encoding" value="UTF-8"/>
      	<property name="org.apache.tapestry.page-login" value="Home"/>
      	<property name="org.apache.tapestry.page-main" value="Desktop"/>
      	<property name="org.apache.tapestry.page-exception" value="Exception"/>
      	<property name="org.apache.tapestry.visit-class">com.ailk.common.data.impl.Visit</property>
      	
      	<!-- Register System Page -->
      	<page name="component.calendar.Calendar" specification-path="/component/calendar/Calendar.page" version="1212"/>
      	<page name="component.upload.Upload" specification-path="/component/upload/Upload.page" version="1212"/>
      	<page name="Exception" specification-path="/Exception.page" version="1212"/>
      	
      	<!-- Register Desktop Page -->
      	<page name="Home" specification-path="/desktop/Home.page" version="1212"/>
      	<page name="Desktop" specification-path="/desktop/Desktop.page" version="1212"/>
      	
      	<!-- Register Application Page -->
      	<page name="CustDemo" specification-path="/CustDemo.page" version="1212"/>
      	<page name="CustFlow" specification-path="/CustFlow.page" version="1212"/>
      	<page name="CustList" specification-path="/CustList.page" version="1212"/>
      	<page name="CustEdit" specification-path="/CustEdit.page" version="1212"/>
      	<page name="CustLog" specification-path="/CustLog.page" version="1212"/>
      	<page name="TemplateList" specification-path="/TemplateList.page" version="1212"/>
      	<page name="Tree" specification-path="/Tree.page" version="1212"/>
      	<page name="DynaTree" specification-path="/DynaTree.page" version="1212"/>
      	<page name="Tabset" specification-path="/Tabset.page" version="1212"/>
      	
      	<page specification-path="/secframe/OperatorAuthor.page" name="OperatorAuthor" version=""/>
      	<page specification-path="/secframe/RoleAuthor.page" name="RoleAuthor" version=""/>
      	
      	<library id="demo" specification-path="/com/ailk/demo/view/components/demo.library"/>
      	
      </application></pre>