jsf in action 笔记:请求处理的生命周期(The Request Processing Lifecycle)--2008.04.08

    Whenever a JSF application receives a request, it goes through a six-step process called the Request Processing Lifecycle. During this process, JSF restores the requested view, translates the request parameters into component values, validates input, updates your backing beans or model objects, invokes action listeners ,and returns a response to the user. 

每个阶段的详细解释:
Table 2.2 JavaServer Faces goes through several phases when it processes a single incoming request.

Phase

DescriptionEvents fired
Restore ViewFinds or creates a tree of components for the selected
view. Some components, like HtmlCommandButton, will
generate action events (or other types of events) in this
phase.
Phase events
Apply Request ValuesUpdates the value of the components to equal ones sent
in the request, optionally using converters. Adds conversion
errors if there is an error. Also generates events from
request parameters.
Phase events, data
model events,
action events
Process ValidationsAsks each component to validate itself (which may
include using external validators). Validation error messages
may be reported.
Phase events, data
model events,
value-change
events
Update Model ValuesUpdates all the values of backing beans or model objects
associated with components. Conversion error messages
may be reported.
Phase events, data
model events,
Invoke ApplicationCalls any registered action listeners. The default action
listener will also execute action methods referenced by
command components (like HtmlCommandButton) and
choose the next view to be displayed.
Phase events,
action events
Render ResponseDisplays the selected view using the current display technology
(like JSP).
Phase events

图示例:
The Request Processing Lifecycle.
Figure 2.4 The Request Processing Lifecycle. Flows with dotted lines are optional. JSF cycles through several phases as it processes each request. After each phase, event listeners are called. Listeners can either continue as normal, report errors and skip to the Render Response phase, or generate the response themselves.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值