[Seaside] call in child component

Sebastian Sastre ssastre at seaswork.com
Wed Mar 19 16:04:36 UTC 2008


It will depend where you put the #addItem and #save responsibility

	cheers,

Sebastian 

 

> -----Mensaje original-----
> De: seaside-bounces at lists.squeakfoundation.org 
> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre 
> de Dennis Schetinin
> Enviado el: Miércoles, 19 de Marzo de 2008 11:41
> Para: Seaside - general discussion
> Asunto: [Seaside] call in child component
> 
> Hello, Seasiders!
> 
> 1. I render a ('parent') page using:
> WAParent >> renderContentOn: html
>   | id |
>   html form:
>     [(html div)
>       id: (id := html nextId);
>       with: [html render: childComponent].
>     (html anchor) with: 'save']
> 
> 2. A 'childComponent' has an anchor inside:
> WAChild >> renderContentOn: html
>   ...
>   (html div)
>     id: 'add';
>     with:
>       [(html anchor)
>         callback: [self addItem];
>         with: '+']
> 
> 3. WAChild >> addItem calls another simple component with 
> some form on it.
> 
> THE PROBLEM IS:
> 
> Ahcnor 'save' (from a 'parent' component) is rendered at the 
> bottom this form.
> 
> Is there a (good) way to get rid of it? ...keeping this nesting of
> components, i.e. '+' should remain a part of a 'childComponent'; I
> think 'adding new item' is a part of WAChild, not WAParent, as WAChild
> can be used in other contexts.
> 
> 
> Sorry for my english and thanks in advance for all answers.
> 
> 
> -- 
> Dennis Schetinin
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list