[Seaside] call in child component

Philippe Marschall philippe.marschall at gmail.com
Wed Mar 19 21:21:50 UTC 2008


2008/3/19, Dennis Schetinin <chaetal at gmail.com>:
> 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.

http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/

Cheers
Philippe


More information about the seaside mailing list