`

JSF 1.2中对以前JSF的修改

    博客分类:
  • JSF
阅读更多


Features that are unavailable as of this writing are listed in gray, available features are listed in non-gray text. Available features are present in the latest release of the official Faces implementation on java.net which continues to run on J2EE 1.3 containers. Note that the content in section IV is mostly available.


I. Unified EL

  A. Major User visible differences between Faces EL and
     Unified EL

    1. Pluggability: now you provide an ELResolver, before
       you provided a PropertyResolver and/or a
       VariableResolver.

    2. Deprecated APIs: everything in javax.faces.el is
       deprecated.  Everything that touches things in that
       package is also deprecated.

    3. New package, javax.el, delivered as part of the JSP
       spec.

  B. Minor User visible differences between Faces EL and Unified EL

    1. application.getPropertyResolver()/application.getVariableResolver(),
       no longer return the head of legacy VR chain

    2. PropertyResolver().getType() returns the type based
       on the setValue() while our previous implementation
       based it on getValue(). Since the spec language is
       vague about this, we decided not to document this.

    3. Resolution of implicit objects is no longer
       overridable.  This means you can't create a managed
       bean with a name equal to any of the implicit
       objects.

  C. Major user-invisible differences 

    1. EL implementation inside faces is gone, impl comes
       from JSP container.

II. JSP and the EL

  A. Major differences

    1. New tag hierarchy: UIComponentELTag

    2. New "setter" types for JSP tags, see
       UIComponentELTag.

    3. jsp-version in the TLD is used to enable/disable
       interpretation of #{} by the container.

III. Tree Creation and Content Interweaving TCCI

  A. Why we need it

    See Hans Bergsten's article at http://www.onjava.com/pub/a/onjava/2004/06/09/jsf.html.

  B. How it works

    I'll write another blog about this when we get closer to
    having an implementation available.

  C. User visible changes

    1. New tag hierarchy: UIComponentClassicTagBase and
       UIComponentELTag.


IV. Miscellaneous changes

  These all correspond to java.net issue tracker issues, but
  numbers below are not the real issue numbers.  Here is a
  link to a query for all the below issues.

  A. JSP layer

    1. 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".

    2. 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>".

    3. 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.

    4. 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
       details.


    5. Avoid EL expression evaluation for "value" attribute
       on "AttributeTag". "AttributeTag" now passes the
       expression to UIComponent for evaluation.


    6.  Clarify the specification with respect to constraint
        violations for tags in the Core Tag Library.

  C. Extensibility changes

    1. 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.

  D. Config/Startup changes

    1. Migrated over to using XML Schema (from DTD) for
       configuation file validation. Please see Section 1.1
       "XML Schema Definition".

       Here is a diagram of the schema.  Click the diagram
       to show the schema fully expanded.  You may have to
       zoom and pan the expanded image.

faces_1_2_schema_contracted.gif



    2. 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.

    3. Application.addELResolver() can be called until first
       request has been served.


  E. Component/Rendering changes:

    1. 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.

    2. 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.

    3. Clarified the use of a string literal for the "action"
       attribute on ActionSource components.

    4. Improve XHTML compliance by rendering both "lang" and
       "xml:lang" attributes.

    5. Enabed "protected" access to internal "DataModel" in
       UIData.

    6. 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.

    7. 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. Added headerClass and footerClass attributes at the
       "h:column" level. Please see Section 8.5 "Standard
       HTML RenderKit Implementation" for more information.

    9. Added standard converter messages. Please see Section
       2.5.2.4 "Localized Application Messages" for more
       details.

    10. 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.

    11. <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.

     12. 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.
       
    13. 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.

    14. Allow the resetting of an input components value by
       introducing a resetValue() method on UIInput.

    15. Permit the passing of a null value to
       SelectItem.setValue().

    16. 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.

    17. 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.19
       "<f:view>" for more details.

  F. State Saving/Lifecycle

    1. Clarify that for client side state saving, the state should
       be encrypted for security.
          
    2. 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.

    3. Introduced a mechanism to detect if a request is a
       postback.

 faces-config

Last modified: Thu Apr 14 20:26:25 EDT 2005
分享到:
评论

相关推荐

    Weblogic10+JSF1.2配置方法

    为了让Web应用程序能够识别并使用部署好的JSF 1.2库,还需要对`weblogic.xml`文件进行相应的修改。具体做法是在该文件中添加如下内容: ```xml &lt;library-name&gt;jsf &lt;specification-version&gt;1.2 ...

    Windows 下整合 weblogic10 jsf1.2 hibernate3

    ### Windows 下整合 weblogic10 jsf1.2 hibernate3 的关键知识点 #### 标题解析:Windows 下整合 weblogic10 jsf1.2 hibernate3 本标题主要涉及的是在 Windows 操作系统环境下如何整合 WebLogic 10、JSF 1.2 和 ...

    Linux 下整合 weblogic12c jsf1.2 Hibernate3

    ### Linux 下整合 weblogic12c jsf1.2 Hibernate3 #### 一、整合概述 在本篇文章中,我们将探讨如何在 Linux 环境下整合 WebLogic 12c 服务器与 JavaServer Faces (JSF) 1.2 和 Hibernate 3 技术。WebLogic 12c 是...

    JSF1.2 Specification

    ### JSF 1.2 规范概述 JavaServer Faces(简称JSF)是一种用于构建企业级Java Web应用程序的标准框架。JSF 1.2规范是该技术的一个重要版本,它为开发人员提供了构建用户界面的组件模型以及一系列用于简化Web应用...

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

    jsf1.2+ejb3.0实现的员工管理系统 &lt;br&gt;1.项目说明:  本实例是一个用JSF1.2+EJB3.0实现的员工CRUD的一个实例,业务非常简单,主要是为了演示这两种技术的使用。若与商业应用类同,纯属巧合。 &lt;br&gt;2.源码...

    IBM Redbook -WebSphere Studio 5.1.2 for JSF and SDO

    - **容器独立性**:JSF组件和页面在不同的Java EE容器中具有高度的可移植性,这意味着应用可以在不同的服务器上运行而无需修改代码。 - **JSF生命周期**:JSF页面请求遵循特定的生命周期,包括Restore Component ...

    JSF完全参考手册 所有代码

    4. **调试和修改**:尝试修改代码,以加深对JSF机制的理解。 5. **应用到实际项目**:将学到的知识应用到自己的项目中,不断实践和优化。 总的来说,这个压缩包中的代码是学习和精通JSF 1.2的重要资源,通过深入...

    JSF in Action英文版(含源代码)

    例如,JSF 2.x引入了更多的注解驱动开发,JSF 3.x则加强了对现代Web标准的支持。 通过阅读《JSF in Action》并研究提供的源代码,开发者可以全面了解JSF,掌握如何利用其强大的功能构建高效、健壮的Web应用。

    ajax4jsf-1.1.1.jar.zip

    Ajax4JSF 1.1.1版本是该项目的一个特定发布,包含了对JSF 1.2的支持,提升了性能和稳定性。 **jar文件详解** "ajax4jsf-1.1.1.jar" 是Ajax4JSF库的核心组件,它包含了一组预定义的UI组件和行为,以及用于处理Ajax...

    jsf简单入门教程

    **1.2 第一个JSF程序** - **环境搭建**:首先需要安装支持JSF的服务器,如Tomcat搭配MyFaces或GlassFish自带的Mojarra。 - **创建项目**:在IDE(如Eclipse或NetBeans)中新建一个JSF项目,通常会自动创建一些基本的...

    ajax4jsf detailed docuementation

    6.1. 对于常见的开发问题,如服务器端的更改、检查发送请求的条件、自定义JavaScript、"onComplete"属性的变化、InvokeOnComponent与JSF 1.2的兼容性、避免"keepAlive"组件异常、布局损坏问题、提交未触发或setter未...

    ajax jsf javascript

    - **调用JSF 1.2组件**:掌握如何在JSF 1.2环境中使用Ajax4jsf组件是迁移或维护旧项目时的必要技能。 - **DataTable区域**:在DataTables中正确使用Ajax4jsf组件可以显著提升大型数据集的处理效率和用户界面的响应...

    JSF入门教程

    **1.2 第一个JSF程序** 在开始编写第一个JSF程序之前,需要确保已经安装了必要的软件和工具,如Java Development Kit (JDK) 和 JavaServer Faces 实现。通常,JSF程序会包括一个XHTML页面,该页面使用JSF组件进行...

    JAVA常用JAR包jdom.jar、jsf-api.jar、jsf-impl.jar、jstl-1.2.jar、saxpath.jar、xalan.jar、xerces.jar、xml-apis.jar包

    在给定的标题和描述中,提到了一系列重要的JAR包,这些包在处理XML、JavaServer Faces(JSF)以及Servlet相关的开发时扮演着关键角色。让我们逐一了解这些JAR包的功能和相关知识点。 1. **jdom.jar**:Java ...

    在NetBeans环境下使用JSF+TOMAHAWK框架开发J2EE程序

    - **页面语言**: 选择JSP作为默认页面语言,以便在JSP页面中轻松集成JSF标签库。 - **页面跳转**: 设置页面跳转时,需要确保URL包含`faces`关键字,例如`...

    weblogic与oracle数据库通过连接池连接及测试代码

    虽然题目中提到的“myeclipse中weblogic服务器下使用jsf1.2的设置步骤”这部分内容没有具体展开,但我们可以简单介绍下如何在 MyEclipse 中配置 JSF 1.2 支持。 1. **安装 JSF 相关库**:确保项目中已经添加了 JSF ...

    ajax4jsf 用户指南

    它充分利用了 JSF 的优势,如生命周期管理、验证、转换的灵活性以及对静态和动态资源的管理。Ajax4jsf 通过提供丰富的 Ajax 支持的组件和高度可定制的外观,与 JSF 整合得非常紧密。 ### 1. 开始使用 Ajax4jsf ###...

    jsf2.0 完整实例(含所有jar包)

    例如,`jstl-1.2.jar`中的`fmt`标签库可用于格式化日期和货币,`fn`标签库则提供了数组和集合的操作函数。 **3. JSF 2.0与Tomcat 6的兼容性** Tomcat 6是一个流行的开源Servlet容器,支持Servlet 2.5和JSP 2.1规范...

    AJAX入门学习——ajax4jsf

    为了确保`ajax4jsf`能够在不同的环境中顺利运行,需要对特定参数进行配置。 ##### 3.1 Web Application Descriptor参数 在`web.xml`文件中,可以通过添加以下元素来指定与`ajax4jsf`相关的参数: ```xml ...

    jsf2.0(mojarra-2.0.2-FCS-binary.zip)

    开发者可以通过运行和修改这些示例来加深对JSF的理解。 JSF 2.0的关键特性包括: - **FacesFlow**: 提供了一种更高级别的页面导航控制,可以定义复杂的页面流程。 - **Managed Beans注解**: 支持在类上使用`@...

Global site tag (gtag.js) - Google Analytics