Define renderer method getChildren(UIComponent) instead of calling 
component.getChildren directly
-------------------------------------------------------------------------------------------------

         Key: MYFACES-707
         URL: http://issues.apache.org/jira/browse/MYFACES-707
     Project: MyFaces
        Type: New Feature
  Components: Implementation  
    Reporter: Simon Kitching
    Priority: Minor


Currently, org.apache.myfaces.renderkit.html.HtmlTableRenderer calls 
"component.getChildren" directly from a number of methods.

I would like to see a new method "getChildren(UIComponent component)" defined 
whose default behaviour is just to return "component.getChildren", and calls to 
component.getChildren changed to call this new method.

This would allow me to override this new getChildren method in a subclass in 
order to be able to control the order in which child components are rendered by 
this component. In particular, I'm trying to extend the table renderer to allow 
user-customisable column ordering. Currently I have to implement this by having 
my custom renderer sort the elements in the child list of the component 
directly which isn't elegant and (I'm afraid) may not beportable or robust 
across releases of the library. Well it's that or duplicate every method that 
makes this call (which is most of them).

Perhaps this new method could even be defined in class 
org.apache.myfaces.renderkit.html so it's available for all renderers? 
Probably method getChildCount(Component) would need to be defined at the same 
time, just in case someone wants to write a renderer that actually hides some 
child components from a parent renderer.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to