[Seaside] ajax html callback

Johan Brichau johan at inceptive.be
Mon May 2 14:10:26 UTC 2011


You don't need to. The easiest solution is to use a script callback that does a jQuery>>replaceWith: (see my previous response)

But what is not nice about the following? 

renderContentOn: html
...
html div
	id: #basket;
	with: [ self renderBasketContentsOn: html].
...

and have somewhere: (html jQuery id: #basket) load html: [:r | self renderBasketContentsOn: r]

imho, this only splits up the rendering methods in conceptual parts

Johan
On 02 May 2011, at 15:40, Julian Fitzell wrote:

> Write a javascript function to pull the *contents* out of the returned
> element and use that for the replacement...? I agree it's not a nice
> pattern to have to keep pulling out that one tag from every method.
> 
> Julian
> 
> On Thu, Apr 28, 2011 at 7:00 PM, Milan Mimica <milan.mimica at gmail.com> wrote:
>> Johan Brichau wrote:
>>> 
>>> On 27 Apr 2011, at 22:25, Milan Mimica wrote:
>>> 
>>>> Is there an easy fix to this, other than moving the rendering of the div
>>>> tag to the outer level?
>>> 
>>> How much easier do you want it to be? That sounds like the most reasonable
>>> approach (I'm applying that pattern *a lot*).
>> 
>> It may be a valid pattern but I don't like it. Having the rendering of the
>> div tag and its contents at the same place looks better to me. Although I've
>> never done a WEB page before.
>> 
>> 
>> 
>> --
>> Milan Mimica
>> http://sparklet.sf.net
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> 
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list