Skip to main content

New Drafts of Java EE Web Tier: JSF 1.2, JSP 2.1, Servlet 2.5

Posted by edburns on February 17, 2006 at 12:50 AM PST

I'm pleased to announce another revision of the Java EE Web Tier. In
Jan Luehe's blog
you can find out what's new in JSP 2.1 Proposed Final Draft 2 (PFD2).
The href="http://jcp.org/aboutJava/communityprocess/maintenance/jsr154/servlet-2.5_MR2.html">Change
Log for Servlet 2.5 will give you the scoop on the Servlet spec.
This blog entry will show what's new in the JSF spec.

In JSF, the most visible new feature since the last draft of the spec
is the addition of the invokeOnComponent() method on
UIComponent. See below for more details.

This revision of the Java Web Tier is fully implemented in href="https://glassfish.dev.java.net/downloads/15Feb06.html">glassfish
build 37, Sun's open source Java EE 5 Application Server, and the
basis for the upcoming href="http://java.sun.com/javaee/">Java EE SDK.

Spec changes since PFD, chronologically by section number

  • 9.5: The href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/tlddocs/index.html">TLDDocs
    for the h: and f: taglibs are now a normative part of the
    spec.

  • 5.4: Use of href="http://jcp.org/en/jsr/detail?id=250">JSR-250 Common
    Annotations @PostConstruct and
    @PreDestroy for managed bean lifecycle
    notifications. See href="http://weblogs.java.net/blog/edburns/archive/2005/08/using_ejb_annot.html">my
    August 2005 blog entry for more on this feature.

  • 3.1.10: Specify how EL ValueExpressions
    must me handled in the attributes map returned from
    UIComponent.getAttributes().

  • 5.4: List the supported Java EE 5 annotations one may
    put in a JSF Managed bean.

    @Resource
    @Resources
    @EJB
    @EJBs
    @WebServiceRef
    @WebServiceRefs
    @PersistenceContext
    @PersistenceContexts
    @PersistenceUnit
    @PersistenceUnits
  • 2.2.2: Define the term "local value" more concretely.

  • Preface: Added section on backwards compatibility with
    previous versions of the JSF spec.

  • 9.4.8: Explicitly state that the use and meaning of a
    UIParameter child is the responsibility of the
    parent component inside which it is nested.

  • 5.3: State that managed bean properties may be Java
    enum types. Define coercion rules.

  • 7.1.1: Widen the expected type returned from a
    UICommand action method to be Object
    instead of String. This allows the use of Java
    enum types as returns from action methods, which can simplify
    navigation rules.

  • 7.3: State that the Action method must return
    Object.

  • 3.1.8: New method:
    UIComponent.invokeOnComponent(), and supporting
    callback interface ContextCallback. This method
    allows you to execute a callback on an arbitrary node in the
    view given its clientId. An override is provided
    for UIData that provides for correctly
    positioning the table to the proper row before continuing to
    find the component.

  • 9.3.1.2: Add a note mentioning that
    tld-version in an explicit taglib def, and
    version in an implicit taglib def are
    semantically equivalent with respect to their use in
    determining the backwards compatability strategy employed.

JSF-API Contract Changes, chronological by functional area

  • Standard HTML RenderKit: Changes to outputText,
    outputFormat, message and messages renderers. Add header and
    footer facets to the declaration of UIColumn.
    Specify that the default value of the "rendered" property is
    true. The "target" attribute of the link
    renderers is not a passthru attribute. Modify commandLink
    renderer to describe what should happen if "disabled" is true.
    Attributes that have a boolean value or meaning, such as
    "ismap", "disabled", or "readonly", must be rendered without
    attribute minization. For example, "ismap=ismap". Update
    "acceptcharset" attribute on Form to be non-passthrough since
    the attribute value is rendered as "accept-charset".
    GridRenderer supports the "caption" attribute.

  • Wrappers for decorating

    	  href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/javax/faces/application/StateManagerWrapper.html">StateManager
    ,
    	  href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/javax/faces/application/ViewHandlerWrapper.html">ViewHandler
    ,
    and
    	  href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/javax/faces/application/ResponseWriterWrapper.html">ResponseWriter
    .

  • JSP Custom tags for JSF 1.2 Components must now extend

    	  href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/javax/faces/webapp/UIComponentELTag.html">javax.faces.webapp.UIComponentELTag
    .
    JSF 1.1 component tags still extend
    	  href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/javax/faces/webapp/UIComponentTag.html">UIComponentTag
    ,
    which is now deprecated.

  • The

    	  href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/javax/faces/component/UIForm.html#isPrependId()">prependId

    property of UIForm is now
    ValueExpression enabled.

  • New method on UIComponent,

    	  href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/javax/faces/component/UIComponent.html#invokeOnComponent(javax.faces.context.FacesContext,java.lang.String,javax.faces.component.ContextCallback)">invokeOnComponent

    and new callback interface
    	  href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/javax/faces/component/ContextCallback.html">ContextCallback
    .

  • Relax the spec language for

    	  href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/javax/faces/component/UIComponent.html#findComponent(java.lang.String)">findComponent

    to allow for any implementation that accomplishes the same
    thing as the specified algorithm. Also allow for
    findComponent to work properly if nested naming
    containers with the same name exist.

JSF-API Implementation Changes, chronological by functional area

  • Refactored build system to be more maintainable.

  • Rob Gibson contributed a fix to improve how more than
    one JSF portlet may run in the same portal.

  • Performance improvements in attribute/property
    transparency.

  • Modify FacesServlet so that if the servlet
    is prefix mapped, requests starting with WEB-INF
    or META-INF must return
    SC_NOT_FOUND.

  • Changes to make tree creation and content interweaving
    work with jsp:include and JSTL's
    c:import.

  • Changed all @exception javadoc statements
    to @throws statements due to Sun bug 6359046.

  • Allow UIParameter children inside of
    select* components.

  • Various backwards compatibility allowances.

Technorati Tags:

Related Topics >>