> I've recently come up with a solution for handling MultiZoneUpdate as the > response from an Ajax.Request.
I'm not sure I follow why you need to create your own Ajax.Request instead of using one of the built-in action/event link components. You can give it the name of one zone but return a MultiZoneUpdate response. (from tapestry core MultiZoneUpdateDemo.tml ) <t:actionlink t:id="update" zone="fred">update</t:actionlink> (from tapestry-core MultiZoneUpdateDemo.java) Object onActionFromUpdate() { return new MultiZoneUpdate("fred", fredBlock).add("barney", barneyBlock).add("dino", "His dog, Dino."); } > Now I need to add the ability to execute a script, generated (or values > populated) by the server. > @Inject RenderSupport and call the addScript methods. If you're using the built-in components then they get handled by default. The code that does that is in ZoneManager.processReply. Is this what you are trying to do? Josh On Sun, May 23, 2010 at 5:13 PM, Paul Stanton <p...@mapshed.com.au> wrote: > Hi all, > > I've recently come up with a solution for handling MultiZoneUpdate as the > response from an Ajax.Request. > > I did this by creating the following javascript function and calling it in > Ajax.Request.onSuccess: > > Tapestry.handleMultizoneUpdate = function (transport) > { > var reply = transport.responseJSON; > // copied from tapestry.js - ZoneManager.processReply > // apparently exposed in t5.2 > Object.keys(reply.zones).each(function (zoneId) { > var manager = Tapestry.findZoneManagerForZone(zoneId); > if (manager) { > var zoneContent = reply.zones[zoneId]; > manager.show(zoneContent); > } > }); > }; > > Now I need to add the ability to execute a script, generated (or values > populated) by the server. > > 1. Where is the code that turns MultiZoneUpdate into JSON? > 2. What is the best way to return a javascript snippet from a tapestry event > listener to the client and have it executed in an Ajax/XHR environment? > > Thanks, p. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- -- http://www.bodylabgym.com - a private, by appointment only, one-on-one health and fitness facility. -- http://www.ectransition.com - Quality Electronic Cigarettes at a reasonable price! -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org