myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Kitching (JIRA)" <...@myfaces.apache.org>
Subject [jira] Updated: (MYFACES-707) Define renderer method getChildren(UIComponent) instead of calling component.getChildren directly
Date Thu, 27 Oct 2005 01:30:56 GMT
     [ http://issues.apache.org/jira/browse/MYFACES-707?page=all ]

Simon Kitching updated MYFACES-707:
-----------------------------------

    Attachment: HtmlRenderer.java.patch

This adds methods "getChildren" and "getChildCount" to the base class that all the html renderers
inherit from, ie
  share/src/java/org/apache/myfaces/renderkit/html/HtmlRenderer.java

This prepares the ground for patches to make renderers use these new methods.

> 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
>     Assignee: Martin Marinschek
>     Priority: Minor
>  Attachments: HtmlRenderer.java.patch
>
> 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


Mime
View raw message