[Seaside] Ajax and decomposition views
Stefan Schmiedl
s at xss.de
Fri Aug 1 08:39:17 UTC 2008
On Fri, 1 Aug 2008 01:25:16 -0700 (PDT)
VAM <fattigra at mail.ru> wrote:
> I may write next code in onClick handler
>
> ListView>>renderContent: html
> super renderContentOn: html.
> (html unorderedList)
> id: self listId;
> with: [self renderItemsOn: html]
>
> ListView>>renderItemsOn: html
> selectionInList list do:
> [:each |
> | listItem |
> listItem := html listItem.
> each = selectionInList selection ifTrue: [listItem class: 'selected'].
> listItem
> onClick:
> ((html updater)
> id: 'list';
> callback:
> [:renderer |
> selectionInList selection: each.
> self renderItemsOn: renderer.
> !!! Here we need render detailsView. How? ListView don't know
> about its id and rendering methods!!!]);
Try announcing the selection change right here passing along all the
information you need to access the detailsView.
> onMouseOver: (html element toggleClassName: 'bounded');
> onMouseOut: (html element toggleClassName: 'bounded');
> with: each]
>
If everything else fails, you can always add an instance variable to
your ListView component, where you store a code block for taking
whichever action is appropriate.
HTH,
s.
More information about the seaside
mailing list