tapestry5 Pages&Components

摘自网上,以便日后查看

Pages and components

Tapestry divides an application into a set of pages. Each page is assembled(装配) from Tapestry

components. Components themselves may be assembled from other components ... there's no artificial depth

limit.

Tapestry pages are themselves components, but are components with some special responsibilities(职责).

All Tapestry components can be containers of other components. Tapestry pages, and most user-defined

components, have a template, a special HTML file that defines the static and dynamic portions of the

component, with markers to indicate where embedded components are active. Components do not have to have a

template, most of the components provided with Tapestry generate their portion of response in code, not

using a template.

Components may have one or more named parameters which may be set (or, more correctly, "bound") by the

page or component which contains them. Unlike Java method parameters, Tapestry component parameters may be

bidirectional; a component may read a parameter to obtain a value, or write a parameter to set a value.

Most components are concerned only with generating HTML. A certain subset of components deal with the

flip-side of requests; handling of incoming requests. Link classes, such as PageLink, DirectLink and

ActionLink, create clickable links in the rendered page and are involved in dispatching to user-supplied

code when such a link is triggered by clicking it.

Other components, Form, and the form control components (TextField, PropertySelection, Checkbox, etc.),

facilitate HTML forms. When such components render, they read properties from application objects so as to

provide default values. When the forms are submitted, the components within the form read HTTP query

parameters, convert the values to appropriate types and then update properties of application objects.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值