Skip navigation

The saga of Oracle ADF Faces on the Java EE SDK continues. In our last installment, Adam Winer explained why ADF Faces won't run on Glassfish. I'm happy to report that after some minor tweaks to Sun's JSF implementation in the Java EE SDK, I think I have it running. However, I would appreciate any testing people could give to see if the entirety of ADF Faces works. ADF Faces is a large piece of software and their demo app is rather comprehensive. Incidentally, it's also a great testcase for extending JSF and exposed a few bugs which have also been fixed.

Here's how to try it. I'm using the jsf-glasssfish-updater technique described in an earlier blog.

  1. Download and install the Java EE 5 SDK. If you already have JDK 5.0 installed, you can just download Sun Java System Application Server PE 9 Beta. Currently there is no Mac OS X build of the Java EE SDK, but don't despair! Mac Users will have to use Glassfish, the Open Source Application Server from which the Java EE SDK is built. Mac OS X is my main development platform, so I know it works there.

  2. Go to the the nightly download area. If you're running the Java EE SDK Preview, download the jsf-sjsas9pebeta-updater.jar. If you're running Glassfish, downloadjsf-glassfish-updater.jar

  3. Execute this with the JDK 5 Java interpreter.

    java -jar jsf-<glassfish-or-sjsas9pebeta>-updater.jar <PATH_TO_YOUR_ASINSTALL_DIRECTORY>

    Where <glassfish-or-sjsas9pebeta>sjsas9pebeta or glassfish, andPATH_TO_YOUR_AS_INSTALL_DIRECTORY is the parent of thelib, bin, domains (and so on) directories.

  4. Download Oracle ADF Faces from Oracle's website. Note, you have to join their developer network to get it.

  5. Unfortunately, ADF Faces appears to have been developed without taking advantage of the benefits of the robust SecurityManager in Java EE 5. Therefore, you'll have to put the following entry in your server.policy file if you want the chooseDate component to work from theadf-faces-demo.war.

    grant codeBase "file:${com.sun.aas.installRoot}/domains/domain1/applications/j2ee-modules/adf-faces-demo/WEB-INF/lib/adf-faces-api-SNAPSHOT.jar" {
          permission "specifyStreamHandler";

    Of course, you'll have to tweak the entries if you use the components in your apps. Also of note, the Sun App Server team has been debating turning the security manager off by default, so this step may not be necessary in the future.

  6. Make sure any attempts to deploy a previous version ofadf-faces-demo.war have been completely removed from the App Server. For example, I have noticed that occasionally theadf-faces-demo directory stick around indomains/domain1/applications/j2ee-modules. I had to manually remove this directory to enable the demo to work.

  7. From the ADF Faces download, deploy theadf-faces-demo.war to your running Java EE SDK App Server and visit the demo to enjoy ADF Faces on Java EE 5!

If you find any bugs when trying the demo please file them on the JSF issue tracker or the Glassfish issue tracker.

Also, note that this version of JSF includes the newinvokeOnComponent feature we developed with help from Jacob Hookom and mentioned in his blog. Lastly, the jsf jars in the Maven 1 Repository have been updated as well.

  Technorati Tags: edburns

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 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 glassfish build 37, Sun's open source Java EE 5 Application Server, and the basis for the upcoming Java EE SDK.

Spec changes since PFD, chronologically by section number

  • 9.5: The TLDDocs for the h: and f: taglibs are now a normative part of the spec.

  • 5.4: Use of JSR-250 Common Annotations @PostConstruct and@PreDestroy for managed bean lifecycle notifications. See 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 fromUIComponent.getAttributes().

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

  • 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 aUIParameter 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 aUICommand action method to be Objectinstead 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 returnObject.

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

  • 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 StateManager, ViewHandler, and ResponseWriter.

  • JSP Custom tags for JSF 1.2 Components must now extend javax.faces.webapp.UIComponentELTag. JSF 1.1 component tags still extend UIComponentTag, which is now deprecated.

  • The prependId property of UIForm is nowValueExpression enabled.

  • New method on UIComponent, invokeOnComponent and new callback interface ContextCallback.

  • Relax the spec language for 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 orMETA-INF must return SC_NOT_FOUND.

  • Changes to make tree creation and content interweaving work withjsp: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: edburns

Filter Blog

By date: