webtier@glassfish.java.net

Collection of JSF 2 issues

From: <webtier_at_javadesktop.org>
Date: Thu, 12 Nov 2009 00:07:30 PST

Hello,

I collected some issues during testing.

Broken XHTML using Facelets
I cannot create valid xhtml documents using Facelets, if I need a <h:head> section. This section is required for resource delivery.

A valid XHTML requires that the document starts with <html>
The <html> must include the following tag to be valid.
<head></head><body></body
A document like the following is not valid. Using an IDE which checks that the xml is valid will always display an error.

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
                        xmlns:h="http://java.sun.com/jsf/html">
        <h:head>
                <title>Facelets - Template Example</title>
        </h:head>
        <h:outputStylesheet library="css" name="default.css"/>
<body> </body>
</html>


The class UIViewParameter has a private rawValue field. This makes it harder to create a sub class. In addition to the decode method, further methods have to be implemented or copy and pasted.

The MessageFactory could be public instead of package private to allow using it in other areas as well. Access to resource bundles is a very common use case.

The class NavigationHandlerImpl could split out view resolution in order to allow easier overriding. I wanted to find out, if the view is a redirect in order to store things in the session in that case.

It is quite hard to provide a custom FacesContext. A number of areas access FacesContext.getCurrentInstance which by default delivers the unwrapped default context instead of the custom context.

All other issues are already posted.

Best Regards

Sebastian Hennebrueder
http://www.laliluna.de
[Message sent by forum member 'laliluna' ]

http://forums.java.net/jive/thread.jspa?messageID=371508