`

不可不看,JSF1.2 changes

    博客分类:
  • JSF
阅读更多

变化还是挺多的,仔细看看,可以省掉很多郁闷的时间哦。

The numbers in the text below refer to issue numbers in the issue tracker found at
<https://javaserverfaces-spec-public.dev.java.net/servlets/ProjectIssues>.
■ 2 - Clarify that for client side state saving, the state should be encrypted for security.
■ 3 - Clarify the specification with respect to constraint violations for tags in the Core Tag
Library.
■ 4 - Added headerClass and footerClass attributes at the “h:column” level. Please
see Section 8.5 “Standard HTML RenderKit Implementation” for more details.
■ 5 - Clarified the use of a string literal for the “action” attribute on ActionSource
components.
■ 6 - Introduced a new optional “label” attribute for input components that will provide an
association between a component, and the message that the component (indirectly)
produced. Please refer to Section 8.5 “Standard HTML RenderKit Implementation” and
Section 2.5.2.4 “Localized Application Messages” for more details.
■ 8 - Made UViewRoot a source of PhaseEvent(s) for all phases of the request processing
lifecycle except RestoreView. Provided additional “before” and “after” phase listener
attributes for the <f:view> tag. Please see Section 4.1.17 “UIViewRoot” for more details.
■ 9 - Clarified the behavior of PhaseListener implementations in the following way: they
must guarantee that if “beforePhase()” is called, then “afterPhase()” must also be called,
regardless of any thrown exceptions. Please see Section 11.3 “PhaseListener” for more
specifics.
■ 11 - Provide a unique window identifier (in addition to the “viewid”) to accomodate
applications that have mutiple instances of the same view, but perhaps in different
browser windows or frames.

13 - Specified “by type” converter registration for BigDecimal and BigInteger.
■ 15 - Enhanced the usage of the “Decorator Pattern” for ViewHandler, StateManager and
ResponseWriter classes by providing abstract wrapper classes to make it easier to override
a subset of the total methods for those classes. Please see Section 10.4.5 “Delegating
Implementation Support” for more details.
■ 16 - Provided additional I18n attributes “dir and “lang” for the tags: <h:outputText>,
<h:outputFormat>, <h:messages>, <h:message>. Please see Section 8.5 “Standard HTML
RenderKit Implementation” for descriptions of these components.
■ 17 - Introduced a new optional “layout” attribute on the “PanelGroup” component that
controls the rendering of either a “div” or “span” HTML element. Please see Section 8.5
“Standard HTML RenderKit Implementation” for more details.
■ 18 - When a resource lookup is done on the java.util.Map (loaded from <f:loadBundle>)
using a key, and the key is not found in the Map, return the literal string ???KEY???
where KEY is the key being looked up in the Map (instead of throwing a
MissingResourceException). Throw a JspException if the named bundle identified by
<f:loadBundle> does not exist. Please see Section 9.4.7 “<f:loadBundle>”.
■ 20 - Specify that the event queue should be cleared after each phase (except
RestoreViewPhase and RenderResponse) if “responseComplete” or “renderResponse” has
been set on the FacesContext.
■ 21 - Provided an additional “binding” attribute for the core Converter, Listener and
Validator tags that would be used as a ValueExpression to alternatively create the
Converter, Listener or Validator instance. Please see Section 9.4 “JSF Core Tag Library”
for more details.
■ 27 - <h:messages> now renders HTML list elements (“<ul>”,”<li>”) if the “layout”
attribute is “list” or the “layout” attribute is not specified. If the “layout” is “table”, an
HTML “table” element is rendered instead of an outer “span”. Please see Section 8.5
“Standard HTML RenderKit Implementation” for more details.
■ 29 - Allow the use of user-defined “onclick” Javascript on CommandLink.
■ 30 - Make the “commandButton” “image” attribute render the same as the
“graphicImage” “img” attribute for consistency. Please see Section 8.5 “Standard HTML
RenderKit Implementation” for more information.
■ 35 - Provided a new facet for DataTable Renderer that allows the rendering of a table
“caption” element immediately following the “table” element. Also provided style sheet
attributes for this new element. Please see Section 8.5 “Standard HTML RenderKit
Implementation” for a descrption of this component.
■ 43 - Migrated over to using XML Schema (from DTD) for configuation file validation.
Please see Section 1.1 “XML Schema Definition”.
■ 45 - Avoided concurrent read issues by using a java.util.HashMap instead of
java.util.WeakHashMap for a component’s Property Descriptor Map. This also fixes the
performance problem as identified in the forum. Please refer to the Property Descriptor
methods and the constructor in javax.faces.component.UIComponentBase.
■ 47 - Introduced a mechanism to detect if a request is a postback.

48 - Specify the algorithm used for client id generation as well as provide a way to allow
the page author to specify exactly what the client Id should be, and preventing Faces from
altering it.
■ 50 - Allow an application to specify multiple render kits by introducing an optional
“renderKitId” attribute on “<f:view>”. It is no longer required to write a custom
ViewHandler to incorporate a different render kit. Please refer to Section 8.3
“ResponseStateManager” and Section 9.4.20 “<f:view>” for more details.
■ 51 - Clarify the specification with respect to “Application Startup Behavior”. Allow
implementations to check for the presence of a servlet-class definition in a web
application deployment descriptor as a means to abort the configuration and save startup
time.
■ 54 - Added new extension elements to the Faces XML schema. Please see Section 1.1
“XML Schema Definition”.
■ 55 - For postback requests, in the “RestoreViewPhase”, during ValueExpression
examination for each component in the component tree, specify that calling the
setValue() method on each ValueExpression, should be done in a “parent-first”
fashion, calling the setValue() method and then traversing the children.
■ 58 - Enabed “protected” access to internal “DataModel” in UIData.
■ 59 - Avoid EL expression evaluation for “value” attribute on “AttributeTag”.
“AttributeTag” now passes the expression to UIComponent for evaluation.
■ 65 - Added standard converter messages. Please see Section 2.5.2.4 “Localized
Application Messages” for more details.
■ 66 - Specified that “FormRenderer” must render the “name” attribute with the same value
as the “id” attribute. Please see Section 8.5 “Standard HTML RenderKit Implementation”
for more details.
■ 67 - Allow the resetting of an input component’s value by introducing a resetValue()
method on UIInput.
■ 68 - Specify that the component tree may be manipulated throughout the request
processing lifecycle, except during render. Please see Section 2.2.6 “Render Response”
for more details.
■ 69 - Permit the passing of a null value to SelectItem.setValue().
■ 72 - Improve XHTML compliance by rendering both “lang” and “xml:lang” attributes.
■ 73 - Added a new FacesException - “javax.faces.application.ViewExpiredException”.
Specified that implementations must throw this exception when an attempt to restore a
view results in failure on postback. Please see Section 2.2.1 “Restore View” for more
details.
■ 74 - Added “disabled” property to “outputLink” and “commandLink”. Please see
Section 8.5 “Standard HTML RenderKit Implementation” for more details.
■ 75 - Added “getRequestContentType” and “getResponseContentType” to ExternalContext.
■ 78 - Added a more “user-friendly” default error message for UIInput “update model”.
Please see Section 2.5.2.4 “Localized Application Messages” for more details.

80 - Specify that the JSF Core Tag Library must not contain any tags that cause JavaScript
to be rendered to the client.
■ 81 - Enable the message displayed for “required” validation, conversion, and validation to
be overridden by the page author (JSP or non-JSP)
■ 82 - Added new feature, the ability to resolve ResourceBundles via the EL without the use
of the <f:loadBundle> tag.
■ 84 - Added rendered attribute to the core f:verbatim tag. Please see Section 9.4
“JSF Core Tag Library” for more details.
■ 85 - Add new tag: f:setPropertyActionListener. Useful for pushing values into managed
beans without allowing modification of the value.
■ 86 - Specified that “OutputLinkRenderer” must render the “name” attribute with the same
value as the “id” attribute. Please see Section 8.5 “Standard HTML RenderKit
Implementation” for more details.
■ 87 - Modified specification for the setVariableResolver() and
setPropertyResolver() methods on Application to state that they may not be
called after the application has served any requests.
■ 93 - Added “escape” flag indicating the text of UISelectItem should be escaped when
rendering.
■ 95 - Allow multiple instances of FacesServlet in a single webapp, mapped with
different URI mappings, to use different implementations of Lifecycle by allowing the
lifecycle-id to be specified as an init-param in addition to the existing way of
specifying it as a context-param.
■ 98 - Specified that “SelectManyCheckboxListRenderer: and “RadioRenderer” must render
the “label” element after the “input element for each “SelectItem. Specified that the
“label” element must refer to the “input” element using the “for” attribute. Please see
Section 8.5 “Standard HTML RenderKit Implementation” for more details.
■ 99 - Specified Java EE 5 Generics usage where applicable.
■ 105 - Specified that for commandButton rendering, the “image” attribute value must not
be escaped. Specified that for graphicImage rendering, the “src” attribute value must not
be escaped.
■ 108 - Specified that JSF implementations that are part of a Java EE technology-compliant
implementation are required to validate the application resource file against the XML
schema for structural correctness. Also specified that validation is recommended, but not
required for JSF implementatons that are not part of a Java EE technology compliant
implementation. Please refer to Section 10.4.2 “Application Startup Behavior” for more
details.
■ 111 - Specified that a component must allow child components to be added to and
removed from the child list of the current component, even though the child component
returns null from getParent().
■ 118 - Specified that an implementation of Map returned from
ExternalContext.getSessionMap implement a “clear” method that calls “removeAttribute”
on each attribute in the Servlet or Portlet session.

119 - Specified that implementations running in a JSR-250 compliant container have their
managed bean methods annotated with @PostConstruct be called after the object is
instantiated, and after injection is performed, but before the bean is placed into scope.
Specified that methods annotated with @PreDestroy be called when the scope for the
bean is ending.
■ 120 - Specified in the renderkit docs that commandButton rendering can generate
javascript for “onclick” attribute.
■ 122 - Clarified renderkit docs with respect to what gets rendered for disabled command
link attributes.
■ 123 - Clarified renderkit docs with respect to dataTable attribute rendering.
■ 124 - Clarified renderkit docs with repsect to graphicImage “alt” attribute.
■ 131 - Specified that a compliant implementation must allow the registration of a converter
for class java.lang.String and java.lang.String.TYPE that will be used to convert values
for these types.
■ 133 - Removed the incorrect statement: “"It is the callers responsibility to ensure that
setViewId() is called on the returned view, passing the same viewId value." pertaining to
ViewHandler.createView()
■ 134 - Fixed backwards compatability issues.
■ 135 - Support Java EE 5 enums as valid types/
■ 138 - Change the required return type for action methods to be Object instead of String.
This allows the usage of Enums for the return type of action methods, as long as the
toString() method of the enum matches the expected value in the application configuration
resources.
■ 145 - Define new method on UIComponent, invokeOnComponent(). This will find a
component in the tree by clientId and invoke a user specified callback on it. Please see
Section 3.1.8 “Component Tree Navigation” and Section 4.1.1.3 “Methods” [of UIData]
for more details.
■ jsf-ri 127 - Specify that FacesContext methods getClientIdsWithMessages( ) and
getMessages( ) must be implemented using order-preserving structures so the items in the
iterator are returned in the order they were added with addMessage().Spec document
changes
■ 147 - Clarified grammer with respect to component id.
■ 151 - Specified standard converter for Enums
■ 152 - Specified EL coercion usage in API javadocs UISelectOne/UISelectMany (when
items are compared in validation) and standard html renderkit docs during encoding of
select components.
■ 154 - Fixed FacesTag “name” attribute discrepency - made it a String (was
ValueExpression).
■ 155 - Specified “columnClasses”, “rowClasses” descriptions for panelGrid in renderkit
docs.

160 - Added and specified ResponseWriter.writeText method that takes a UIComponent
argument.
■ The TLDDocs for the h: tag library are now a normative part of the spec.

 

分享到:
评论
1 楼 hintcnuie 2008-04-02  
This document would have no effort for newers to JSF,but for JSF1.1 users

相关推荐

    jsf1.2官方例子

    **JSF 1.2官方例子详解** JavaServer Faces (JSF) 是一个用于构建Web应用程序的Java EE组件模型和事件驱动框架。JSF 1.2是该框架的一个重要版本,它在前一版的基础上增加了许多新特性,提升了性能,并优化了开发者...

    jsf1.2 download javaserver faces

    JSF 1.2是该框架的一个早期版本,发布于2006年,是JSF规范的第二版。在本文中,我们将深入探讨JSF 1.2的主要特性、工作原理以及如何下载和使用。 1. **JSF 1.2概述** - JSF 1.2是基于组件的框架,它将用户界面元素...

    JSF1.2所需要的jar包

    在这个主题中,我们将深入探讨JSF 1.2的核心概念,以及为什么`JSF.jar`这个文件对于运行JSF 1.2应用至关重要。 1. **JSF框架概述**:JSF设计的主要目标是为开发者提供一种声明式编程模型,以组件为基础构建用户界面...

    jsf 1.2 jar 应用包

    **JSF 1.2 Jar 应用包详解** JavaServer Faces (JSF) 是一个由Sun Microsystems(现已被Oracle收购)开发的Java EE组件模型和用户界面框架,用于构建和呈现Web应用程序。JSF 1.2是该框架的一个早期版本,发布于2006...

    jsf1.2

    **JSF 1.2 框架详解** JavaServer Faces (JSF) 是一个用于构建用户界面的Java EE框架,特别适用于Web应用程序的开发。JSF 1.2是该框架的一个重要版本,它在1.1的基础上进行了许多改进和增强,提供了更丰富的功能和...

    Weblogic10+JSF1.2配置方法

    然而,对于WebLogic 10版本而言,它并不直接支持JSF 1.2。本文将详细介绍如何在WebLogic 10上配置并支持JSF 1.2。 #### 二、配置步骤 ##### 1. 准备工作 - **确保WebLogic Server 10已安装**:这是配置的前提条件...

    jsf1.2入门教程

    IMB最新发布的jsf1.2基本教材,是jsf入门的首选教程

    JSF1.2的新特性总结.

    **JSF 1.2 新特性详解** JavaServer Faces (JSF) 是Java平台上用于构建Web应用程序的一种组件模型。JSF 1.2是该框架的一个重要版本,它引入了一系列新特性和改进,提升了开发效率和用户体验。以下是对JSF 1.2新特性...

    JSF1.2写的简单DEMO 对初学者有帮助

    **JSF 1.2 简介** JavaServer Faces(JSF)是Java平台上的一个用于构建用户界面的组件模型框架,它主要用于创建Web应用程序。JSF 1.2是该框架的一个早期版本,发布于2006年,为开发者提供了丰富的UI组件和事件处理...

    jsf1.2入门教程(源码)

    JSF 1.2是该框架的一个早期版本,发布于2006年,它在JSF 1.1的基础上进行了一些改进和增强。本入门教程的源码提供了学习和理解JSF 1.2框架基础知识的机会。 JSF的核心概念包括以下几个部分: 1. **组件库**:JSF...

    core jsf 1.2 jsf 核心

    **JSF 1.2核心详解** JavaServer Faces (JSF) 是Java平台上的一个用于构建用户界面的组件模型框架,特别适用于Web应用程序的开发。JSF 1.2是该框架的一个重要版本,它在JSF 1.1的基础上进行了一系列的改进和增强,...

    JSF1.2.07版源代码

    在这个"JSF1.2.07版源代码"中,我们可以深入理解JSF的核心机制和实现细节。 1. **JSF架构概述** JSF由多个组件构成,包括视图层、模型层、控制层和服务层。源代码中包含的组件如Facelets、UIComponent、Managed ...

    jsf1.2 jar包下载

    在使用JSF 1.2时,需要注意的是,由于这是一个较旧的版本,它可能不支持后来引入的一些新特性,如CDI(Contexts and Dependency Injection)和Faces 2.x及更高版本的组件库。因此,在现代项目中,可能需要考虑升级到...

    jsf1.2_04api

    这个API包“jsf1.2_04api”包含了JSF 1.2版本的类库和接口,供开发者在项目中引用和使用。 JSF的核心组件包括: 1. **Facelets**:JSF 1.2引入了Facelets作为默认的视图定义语言,替代了原来的JSP。Facelets是一种...

    JSF1.2+EJB3实现的一个项目实例

    jsf1.2+ejb3.0实现的员工管理系统,做成了部分:一部分是ejb端,实现业务逻辑;另一部分是web端,实现web浏览。通过这个实例,你可以学会用jsf1.2和ejb3去做企业项目。内附源代码、分析和部署文档。

    JSF1.2的jar包

    **JSF 1.2 知识点详解** JavaServer Faces (JSF) 是一个用于构建用户界面的Java EE框架,特别适用于Web应用程序的开发。JSF 1.2是该框架的一个版本,发布于2007年,相较于早期版本,它提供了更多的功能和改进。以下...

    JSF1.2的新特性

    ### JSF 1.2 新特性深度解析 JavaServer Faces(JSF)1.2作为一项重要的技术更新,带来了诸多革新,旨在优化Web应用程序的开发流程,提高开发效率与用户体验。以下是对JSF 1.2关键新特性的详细解析。 #### 统一JSP...

    JSF1.2(Richfaces)环境包

    jsf1.2(Richfaces)环境所需要的jar包,如果您在Tomcat5.X运行,请将该内容全部copy进lib包即可。如果是Tomcat6的话,会带有部分相同的jar包,请忽略即可。希望对您有用。谢谢。

    JSF1.2自定义验证器的实现

    在JSF 1.2版本中,为了确保数据输入的正确性和一致性,开发者可以自定义验证器来实现特定的数据验证逻辑。本文将深入探讨如何在JSF 1.2中创建和使用自定义验证器。 自定义验证器是JSF中的一个重要特性,它允许...

Global site tag (gtag.js) - Google Analytics