[Seaside] something like #callback:value: but for #html: ?
Robert Sirois
watchlala at hotmail.com
Thu Jun 30 04:00:23 UTC 2011
Use a component or use the renderer block like a normal canvasser.
The examples should load with seaside core.
RS
> From: estebanlm at gmail.com
> Date: Wed, 29 Jun 2011 23:55:58 -0300
> To: seaside at lists.squeakfoundation.org
> Subject: [Seaside] something like #callback:value: but for #html: ?
>
> Hi,
> I'm trying to fill an JQAccordion when user opens it, and I think the way to do that is by doing something like this:
>
> html div
> script: (
> html jQuery new accordion
> active: self selectedIndex - 1;
> autoHeight: false;
> onChangestart: ((html jQuery new
> alias: 'ui';
> access: 'newContent';
> call: 'load' with: (html jQuery ajax
> html: [ :renderer | renderer text: 'TEST' ];
> fullUrl))
> asFunction: #(event ui)));
> with: [
> html div id: 'header1'; with: 'header1'.
> html div.
> html div id: 'header2'; with: 'header2'.
> html div ]
>
> this example is working fine, but I'm always rendering 'TEST'. I need to discriminate which content I need to render, so I need the header id value. Using #callback:value I would call something like:
>
> ((html jQuery ajax
> callback: [ :v | "Some code here" ]
> value: (html jQuery new
> alias: 'ui';
> access: 'newHeader';
> call: 'attr' with: 'id'))
> asFunction: #(event ui))
>
> but I don't have nothing similar with #html: .
>
> of course, I can call first a callback who sets the "current header", then make an ajax call, but that's not efficient (two calls instead one).
> so, I would like to have something like #html:value:
>
> does anybody knows how can I solve this problem?
>
> thanks,
> Esteban
>
> _______________________________________________
> 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/20110629/c415ba17/attachment-0001.htm
More information about the seaside
mailing list