You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by Apache Wiki <wi...@apache.org> on 2011/08/04 21:27:40 UTC

[Myfaces Wiki] Update of "How_Component_Child_Rendering_Works" by LeonardoUribe

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:
http://wiki.apache.org/myfaces/How_Component_Child_Rendering_Works?action=diff&rev1=2&rev2=3

- == How Component Child Rendering Works ==
+ See the updated page here
  
+ https://cwiki.apache.org/confluence/display/MYFACES/How+Component+Child+Rendering+Works
- ##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)''
-