dev@javaserverfaces.java.net

Re: [jsf 2.0] inconsistent javadoc between UIViewRoot.getComponentResources and UIViewRoot.addComponentResource

From: Leonardo Uribe <lu4242_at_gmail.com>
Date: Mon, 4 May 2009 12:45:48 -0500

2009/5/4 Ryan Lubke <Ryan.Lubke_at_sun.com>

> On 5/3/09 9:29 PM, Leonardo Uribe wrote:
> Hello Leonardo,
>
> Spec feedback is best sent to jsr-314-comments_at_jcp.org.
>
> I'll forward this on.
>

Thanks Ryan.


>
> Hi
>>
>> Checking the latest javadoc (jsf-spec-2.0-20090327) for jsf 2.0, there is
>> something wrong with the description of UIViewRoot.getComponentResources and
>> UIViewRoot.addComponentResource.
>>
>> The description on UIViewRoot.getComponentResources(FacesContext context,
>> String target) says this:
>>
>> ".........Return an unmodifiable List of UIComponents for the provided
>> target agrument........"
>>
>> but the description of UIViewRoot.addComponentResource(FacesContext
>> context, UIComponent componentResource, String target) says this:
>>
>> "..... ...................
>> # Call getComponentResources(javax.faces.context.FacesContext,
>> java.lang.String) to obtain the child list for the given target.
>> # If the component ID of componentResource matches the the ID of a
>> resource that has allready been added, remove the old resource.
>> # Add the component resource to the list.
>> .............."
>>
>> The inconsistency is that if getComponentResources return an unmodifiable
>> List, you can't remove and add components to that list, but the remaining
>> javadoc comments suggests this. Obviously, the code don't do what javadoc
>> says.
>>
>> It is possible that someone correct the javadoc and publish the correct
>> behavior?.
>>
>> regards
>>
>> Leonardo Uribe
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>