Tapestry常見(jiàn)規(guī)范文件的書(shū)寫(xiě)
四種常見(jiàn)的Tapestry規(guī)范
(<application>,<component-specification>,<page-specification>and<library-specification>)
應(yīng)用程序規(guī)范文件,一般是*.application后綴文件
頁(yè)面規(guī)范文件,是組件規(guī)范的子集一般是*.page后綴文件
組件規(guī)范文件,擴(kuò)展新的組件一般是*.jwc 后綴文件
<bean>元素,獲得bean的引用,實(shí)例化(instantiated)初始化(initialized)JavaBean,在Page定義和組件元素中出現(xiàn)。
<bean> Attributes
Name |
Type |
Required ? |
Default Value |
Description |
name |
string |
yes |
|
The name of the bean, which must be a valid Java identifier. |
class |
string |
yes |
|
The name of the class to instantiate. |
lifecycle |
none|page|render|request |
no |
request |
As described above; duration that bean is retained. |
<component> element自定義組件
出現(xiàn)在組件規(guī)范和頁(yè)面規(guī)范中
定義被用來(lái)植入到容器中(組件或者頁(yè)面)的組件
Name |
Type |
Required ? |
Default Value |
Description |
id |
string |
yes |
|
Identifier for the component here and in the component's template. Must be a valid Java identifier. |
type |
string |
no |
|
A component type to instantiate. |
copy-of |
string |
no |
|
The name of a previously defined component. The type and bindings of that component will be copied to this component. |
<property-specification> 定義需要實(shí)現(xiàn)的靜態(tài)方法
posted on 2005-11-10 12:22 bluesky 閱讀(432) 評(píng)論(0) 編輯 收藏 所屬分類(lèi): 框架應(yīng)用