四種常見的Tapestry規范
(<application>,<component-specification>,<page-specification>and<library-specification>)
應用程序規范文件,一般是*.application后綴文件
頁面規范文件,是組件規范的子集一般是*.page后綴文件
組件規范文件,擴展新的組件一般是*.jwc 后綴文件
<bean>元素,獲得bean的引用,實例化(instantiated)初始化(initialized)JavaBean,在Page定義和組件元素中出現。
<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自定義組件
出現在組件規范和頁面規范中
定義被用來植入到容器中(組件或者頁面)的組件
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> 定義需要實現的靜態方法