翻译http://www.javabeat.net/tips/116-new-features-in-jsf-20.html
JSF2.0的一些新特性:
- 为了更好的支持Ajax,扩大了请求处理生命期。
- 将“树结构的生成”和“树结构的使用”分成两个独立的生命期阶段。
- 允许部分树在生命期内通过Ajax来访问集合
- 允许可标记的JSF页面。更广泛的说,如果HTTP GET 可以使用,该JSF页面就可以使用。
- 更合适的客户端之间和内部组件,表单级的验证(如果可以使用JSR303验证)
- 对绑定和分发与某个组件相关静态资源的良好支持,包括:图片、样式表、脚本等。也应该能指定资源的默认位置。
- 对标准html组件的策略性补充:日期选择其,树、标签浏览、文件上传控件。
- 提供某种机制,以尽量减少“丢失更新”和“复制按钮按下”的问题。这些机制必须是插件形式或可由用户定制。
- 页面动作:是指“当页面加载时,调用这些动作(如果有必要的话,可以通过Ajax)”。
- 提供一种机制,使得访问持久存储变得容易。
由于有些地方翻译不好,提供原文
原文如下:
New Features
- Expand the request processing lifecycle to be aware of Ajax. This may include describing a small developer-contract footprint JavaScript library as part of the JavaServer Faces specification.
- Separate the "build the tree" and "render the tree" processes into two separate lifecycle phases.
- Allow for partial tree traversel during lifecycle execution via Ajax.
- Allow for bookmarkable JSF pages. More broadly, if HTTP GET can be used, it should be used.
- Decent client side, inter-component and form-level validation (leveraging JSR-303 validation if possible).
- First classsupportfor bundling and delivering staticresourcesassociated with a component: images, stylesheets, scripts, etc. Should be able to specify default locations forresources.
- Strategic additions to the Standard HTML RenderKit: Date Picker, Tree, Tab View, File Upload components.
- Provide a mechanism to minimize the "Lost Update" and "Duplicate Button Press" problems. Thesemechanismsmust be pluggable or customizable from the user.
- Page actions: The ability to say, "when this page loads, invoke this action (via Ajax if necessary)."
- Provide a mechanism to easily access persistent store.