Hi,
For an HTML table, much of the decoding process is in fact 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) it.next();
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.
And in my case, I'm trying to write a custom UIColumn class, but am not
able to get control of the decode process because the decoding calls go
directly to the children of my custom component rather than to the
custom component itself.
Have I misunderstood anything here? If not, would there be interest in
patching this so UIData delegates to UIColumn rather than accessing the
grandchildren directly? Or perhaps this is not possible due to the JSF spec?
Thanks,
Simon