Either is probably fine. In general, it would be *better* to arrange for only the active sub-components to be in #children (all #children are given the opportunity to add stylesheets, updateUrl:, etc. and you may not want inactive components to do that) but I&#39;d say it&#39;s a common pattern to return all the children that you *might* render.<br>

<br>Julian<br><br><div class="gmail_quote">On Thu, Jan 7, 2010 at 4:33 AM, Cyrille Delaunay <span dir="ltr">&lt;<a href="mailto:cy.delaunay@gmail.com">cy.delaunay@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Thank you. Now I have another question:)<div>If I have subcomponents (in my root component ) that I render only in specific conditions (when the user press a button for example), should those components always figure in the children method?</div>


<div>Or should they be added in the children only when they are rendered?</div><div><br></div><div>In general, what is the comon solution to deal with this kind of problem (render components in specific conditions) ?<br>

<br>
<div class="gmail_quote">2010/1/4 Julian Fitzell <span dir="ltr">&lt;<a href="mailto:jfitzell@gmail.com" target="_blank">jfitzell@gmail.com</a>&gt;</span><div><div></div><div class="h5"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


No, your root component can have a #renderContentOn: method. The<br>
default behaviour if there isn&#39;t one is to simply render each of the<br>
children in order, but I&#39;d say more or less nobody relies on that<br>
behaviour. In your renderContentOn: method, you simple do &quot;html<br>
render: childComponent&quot; wherever you want one of the children rendered<br>
(and yes, you should return them from #children also).<br>
<br>
Julian<br>
<div><div></div><div><br>
On Mon, Jan 4, 2010 at 7:05 AM, Cyrille Delaunay &lt;<a href="mailto:cy.delaunay@gmail.com" target="_blank">cy.delaunay@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt; Here is what I would like to do with my apllication:<br>
&gt; - I have a root component composed by several components. If I understand<br>
&gt; well how to do that, I just define a &#39;children&#39; method wich define the<br>
&gt; subcomponents of this root component.  I can not define a &quot;renderContentOn:&quot;<br>
&gt; method in the root component, but only in the subcomponents. Am I right?<br>
&gt; - Therefor, I can specify some CSS Classes or Ids to the subcompenent but<br>
&gt; not for the whole root component. Imagine I want a specific background color<br>
&gt; for my root component and inside him, a specific background colour for each<br>
&gt; subcomponent (so that between each of them we see the &#39;root colour&#39;). How<br>
&gt; can I do that?<br>
</div></div>&gt; _______________________________________________<br>
&gt; seaside mailing list<br>
&gt; <a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
&gt; <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
&gt;<br>
&gt;<br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</blockquote></div></div></div><br></div>
<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br>