四种常见的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> 定义需要实现的静态方法