Comments from: [jsr-314-open] UIViewRoot.getComponentResources() documentation
does not match with the implementation
Doing some tests I notice the implementation in mojarra of
UIViewRoot.getComponentResources() does not match with the spec javadoc. This
javadoc says this:
"...Return an unmodifiable List of UIComponents for the provided target
agrument. Each component in the List is assumed to represent a resource instance.
The default implementation must use an algorithm equivalent to the the following.
- Locate the facet for the component by calling getFacet() using target as
- If the facet is not found, create the facet by calling
context.getApplication().createComponent() using javax.faces.Panel as the argument
o Set the id of the facet to be target
o Add the facet to the facets Map using target as the key
- return the children of the facet...."
The javadoc says cleary that the returning facet is created using
javax.faces.Panel as argument. But mojarra uses
"javax.faces.ComponentResourceContainer" as argument. The effect can be seen
when you try to use myfaces on glassfish v3 and you set the classloader delegate
to true (I know that configuration is wrong, but the exception caught my attention).
Looking on google I saw this issue:
I also saw that the line:
"Set the id of the facet to be target"
is to respected too. Tomahawk has an example
(myfaces-example-simple20/calendar.jsf) that has this code
It works with mojarra (2.0.3-SNAPSHOT) but do not with myfaces. The reason is
myfaces is doing what spec says, but mojarra set the id to
"javax_faces_location_body". That's not fair. On JSF 2.0 Rev A Change Log there
is no issue related to this one.
I have to say it, my personal opinion is that spec changes should not be done
without document them on javadoc or add them to JSF 2.0 Rev A Change Log. Do
things like that, only makes things more difficult to track, even worst,
important details that needs to be on the spec just will be missing.
Could anyone include this detail on:
and correct the spec javadoc? Thanks !