[Seaside-dev] registering a callback

sebastian at flowingconcept.com sebastian at flowingconcept.com
Thu Oct 8 13:31:00 UTC 2009


#withoutParameters should not be sent if _s and _k is needed.
Fixed and translated to a more clean version:

^ JSFunction new
	add: (html javascript goto: (html prototype request callback:[self defaultCallbackAction]; fullUrl));
		yourself

Note: the prototype way is the same as jquery but it requires the fullUrl method to be implemented in PTAjax
thanks to Esteban Lorenzano
sebastian


----- Original Message -----
From: sebastian at flowingconcept.com
To: "seaside-dev" <seaside-dev at lists.squeakfoundation.org>
Sent: Wednesday, October 7, 2009 11:21:57 PM (GMT-0300) Auto-Detected
Subject: [Seaside-dev] registering a callback

Hi there,
if is needed to register a callback in order to make a typical seaside (non ajaxian) callback, would you use a snippet of code like this:

callbackId := html callbacks store: (WAActionCallback on: [self defaultCallbackAction]).
actionUrl := html context actionUrl withoutParameters addParameter: callbackId.

^ JSFunction new
	add: ('window.location.href="',actionUrl asString,'"') asJSObject;
	yourself

or.. 
do you see something wrong on using that?

thanks,
sebastian
_______________________________________________
seaside-dev mailing list
seaside-dev at lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev


More information about the seaside-dev mailing list