[Seaside] Render into a separate document while sharing context

Paul DeBruicker pdebruic at gmail.com
Thu May 17 16:19:58 UTC 2012

When I send a 'reset your password' email I think I'm doing what you're 
asking about in your original question. e.g.

newUrl := html context actionUrl
		(html callbacks
					on: [self home.
						self show: (ResetPassword new user: member) ])).
urlToEmail := html context resourceUrl greaseString , newUrl greaseString.	

self sendMailWithUrl: urlToEmail toMember: member.

So when clicked in their email their browser opens up the 'reset 
password' form in a page on my site.  It doesn't use WABuilder and does 
store a callback that does get executed in the current render context. 
It also expires when the current session expires.

On 05/17/2012 08:59 AM, Norbert Hartl wrote:
> Or different asked:
> Using
> WARenderCanvas builder render: [:h| ...]
> enables me to render something into a string. But if the rendered block produces callbacks they aren't registered anywhere and cannot be called aftwards, right?
> Norbert
> Am 17.05.2012 um 11:32 schrieb Norbert Hartl:
>> Am 16.05.2012 um 20:50 schrieb Paul DeBruicker:
>>> On 05/16/2012 09:16 AM, Norbert Hartl wrote:
>>>> To place a marker I need to call some javascript function. That function takes latitude, longitude and a definition of a window that pops up if the marker is pressed. The popup window needs to contain an html anchor. Therefor I need to add the callbacks to the current renderer.
>>>> Is there something that assists in doing this. WABuilder would be fine but it creates a new render context.
>>>> thanks,
>>>> Norbert____
>>> Could you do something like what I suggested in the Zinc Callback Limit thread a few days ago?
>>> http://forum.world.st/Zinc-Callback-Limit-tp4630181p4630195.html
>> I don't think so. You are tunneling virtual callbacks over one real callback. But that one real callback you need to draw in this canvas. My problem is the place where the rendered string should be drawn. Basically I have
>> ...
>>    "this is anchor1"
>>    html anchor
>> 	onClick: (html jQuery ajax ...)
>>         with: 'foo'.
>>    html script: (JSStream on: '
>>       var aMarker = new google.maps.Marker({
>>          position: new google.maps.LatLng(marker.lat, marker.lon),
>>          map: map
>>       });
>>       google.maps.event.addListener(aMarker, "click", clickedMarker);
>>       aMarker.info = new google.maps.InfoWindow({
>>          content: '<a href="...">foo</a>'
>>       }); '.
>> ...
>> So I have anchor1 that is rendered on the canvas. Then I need to render a script on that canvas that creates a marker on a map. If you look at the "content: '<a..." there I need to render anchor1 (or similar) again. So it is perfect if the anchor registers its callback but then I need the string presentation of that link in order to be able to add it to the javascript stream. I have the impression that the solution is quite easy and I'm just missing a link.
>> Norbert
>> _______________________________________________
>> 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