myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Myfaces Wiki] Update of "How_Component_Child_Rendering_Works" by LeonardoUribe
Date Thu, 04 Aug 2011 19:27:40 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The "How_Component_Child_Rendering_Works" page has been changed by LeonardoUribe:

- == How Component Child Rendering Works ==
+ See the updated page here
- ##language:en
- Any "container" or "layout" component is going to need to manage the way in which its children
are rendered as well as decide whether they will be rendered.  As a simple example, consider
the standard <h:panelGrid> component.  <h:panelGrid> needs to intersperse rendering
the children with the <tr> and <td> elements that provide the grid markup html
tags, so this component will return "true" for the "rendersChildren" property.
- A component-and-renderer combination that returns true is asserting that the component will
take full responsibility for what will be rendered by itself or any of its children.  If your
component is willing to take that responsibility, then it is legal to do so.  Fortunately,
it's easy to do something like what <h:panelGrid> does without knowing anything about
the nature of the child components.  All your component has to do is write out its decorations,
then notify the child components to render themselves.  The child components, in turn, will
decide whether to manage their own children, in a recursive process going down the tree.
- ''(Paraphrased from a message by Craig !McClanahan)''

View raw message