[Seaside] How to include style for a component composed by other components

Cyrille Delaunay cy.delaunay at gmail.com
Thu Jan 7 12:33:30 UTC 2010


Thank you. Now I have another question:)
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?
Or should they be added in the children only when they are rendered?

In general, what is the comon solution to deal with this kind of problem
(render components in specific conditions) ?

2010/1/4 Julian Fitzell <jfitzell at gmail.com>

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


More information about the seaside mailing list