[jsr-314-open-mirror] [jsr-314-open] UIViewRoot.getComponentResources() documentation does not match with the implementation

Martin Marinschek mmarinschek at apache.org
Wed May 5 00:14:56 EDT 2010


Hi guys,

I think someone needs to pay a lot of attention to Leonardo's issues
with JavaDoc/Spec changes and omissions - for building a second
implementation which derives from the same document, he _needs_ to
have as concise a spec as possible.

best regards,

Martin

On 5/4/10, Leonardo Uribe <lu4242 at gmail.com> wrote:
> Hi
>
> 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 the argument.
>     * 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:
>
> https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1427
>
> 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
>
>         <h:panelGroup id="body">
>
> 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:
>
> http://wiki.jcp.org/wiki/index.php?page=JSF+2.0+Rev+A+Change+Log
>
> and correct the spec javadoc?
>
> regards,
>
> Leonardo Uribe
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



More information about the jsr-314-open-mirror mailing list