[ http://issues.apache.org/jira/browse/MYFACES-707?page=all ]
Simon Kitching updated MYFACES-707:
-----------------------------------
Attachment: HtmlTableRendererBase.java.patch
HtmlLinkRendererBase.java.patch
HtmlGridRendererBase.java.patch
Update renderers to use new inherited getChildCount(comp) and getChildren(comp)
methods instead of comp.getChildCount() and comp.getChildren().
This allows child renderers to override these methods and change what child
components a parent renderer sees.
By the way, I've noticed that HtmlGridRendererBase.java has no svn properties
set. In particular it doesn't have eol-style set, and was checked in originally
from a windows machine so I see DOS-style CR/LF line endings. I suggest setting:
svn:keywords : Author Date Id Revision
svn:eol-style : native
Regards, Simon
> 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: HtmlGridRendererBase.java.patch,
> HtmlLinkRendererBase.java.patch, HtmlRenderer.java.patch,
> HtmlTableRendererBase.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