[Seaside] Scriptalicious

Ramon Leon ramon.leon at allresnet.com
Thu Aug 3 20:17:22 UTC 2006


> Sorry for not replaying earlier, I flagged your mail but I 
> simply had no time to answer.
> 
> > > Hmm... this almost works.  It does update multiple elements, but 
> > > it's a bit too simple to do what I need.  Here's kind of what I'm 
> > > trying to do, syntax just made up for second add...
> > >
> > > html script: (html evaluator
> > >     callback: [ :script |
> > >         script add: (script element id: 'id1'; update: 
> 'price here').
> > >         script add: (script element id: 'id2';
> > >             render: [:r |
> > >                 self allPrices do:[:each |
> > >                     r text: each.
> > >                     r anchor callback:[self bookRate: each];
> > > text: 'book
> > > rate']])])
> > >
> > > Ok, updating the first element, simple text content, works great, 
> > > but updating the second element, need to insert multiple child 
> > > elements with anchors and callbacks, need a rendering 
> context, can't 
> > > figure this one out.
> > > Any ideas?
> >
> > Lucas, any suggestions about this?
> 
> Mhh, I don't understand your code. Did you implement a method #render:
> in SUElement or is this some old code of mine?
> 
> I am a bit puzzled, the latest version of scriptaculous seems 
> to be a bit buggy. I'll definitely have to have a look at it tomorrow.
> 
> Lukas

No no, I made up the render as an example of what I wanted to do, rather
than call update: with a string, I want a rendering context so I can render
a bunch of child elements into the element I'm updating.  I don't know how
to do it, just wondering if that's possible somehow?  Your multiple update
sample worked, it was just too simple for what I needed.



More information about the Seaside mailing list