myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger (JIRA)" <>
Subject [jira] Commented: (MYFACES-781) UIData accesses its grandchild components directly
Date Fri, 04 Nov 2005 15:52:20 GMT
    [ ] 

Mike Kienenberger commented on MYFACES-781:

Oops!  I made the last comment right before going to sleep, and I didn't notice I was looking
at the javadocs for UIComponentBase.html#processDecodes instead of UIData.html#processDecodes!

The javadocs for UIData clearly indicate that UIData is designed to spec.  Sorry for the misinformation.

Might as well close this one as "Won't Fix"

> UIData accesses its grandchild components directly
> --------------------------------------------------
>          Key: MYFACES-781
>          URL:
>      Project: MyFaces
>         Type: Bug
>   Components: Implementation
>     Reporter: Simon Kitching

> For an HTML table, much of the decoding process is controlled by the components rather
than the renderer.
> In the class javax.faces.component.UIData, method "processColumnChildren" (which is called
by processDecodes) does this:
>   for (Iterator it = getChildren().iterator(); it.hasNext();)
>   {
>       UIComponent child = (UIComponent);
>       if (child instanceof UIColumn)
>       {
>           if (!child.isRendered())
>           {
>               //Column is not visible
>               continue;
>           }
>           for (Iterator columnChildIter = child.getChildren()
>               .iterator(); columnChildIter.hasNext();)
>           {
>              UIComponent columnChild = (UIComponent) columnChildIter
>                   .next();
>              process(context, columnChild, processAction);
>           }
>       }
>   }
> And that last call to process them calls component.processDecodes, which delegates to
the renderer as needed.
> However this code means UIData is accessing its *grandchildren* directly, rather than
just its children. I don't believe this is very nice OO design; UIData's children should be
responsible for managing their own children, ie the UIColumn class should be told to process
the children rather than calling getChildren on it and manipulating those directly. 
> It also makes it impossible for a custom UIColumn class to receive decode calls; they
go direct to the custom column's children.
> See this email thread for more info, esp. responses by Mike Kienenberger (thanks, Mike):

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message