So... I just finished a new little utility... MultiZoneUpdateWithScript. It's just a proof of concept (it's not perfect), but basically it takes the concept of a MulitZoneUpdate and also populates the "script" object in the JSON reply so that Tapestry will automatically fire the supplied javascript code on the client once the zones are done being updated. Thus, I can use this with my form to automatically close the window upon completion. Yay!
return new MultiZoneUpdateWithsScript("zone1",zone1).add("zone2",zone2,"myWindow.close();"); If anyone is interested in this code, let me know. BTW, is there an "insider's guide" to the tapestry.js file? -Nathan On Thu, Mar 11, 2010 at 1:23 AM, Nathan Kopp <nathan.k...@gmail.com> wrote: > I have a page that uses ChenilleKit to pop up a window that contains a > component. That component contains a form enclosed in a zone. The form get > submitted under a variety of circumstances primarily for the purpose of > storing the state and redrawing the form based on some option the user just > selected. This all works great. However, once the user has finally > finished everything, I'd like for the final submit button to do something > else other than just update the zone. I want it to cause the window to > close and for another zone on the page, outside of the window, to be > updated. And I need to make it close the ChenilleKit window. I haven't > figured out how to make this happen yet. > > I think I figured out that I can pass a zone from the page to the inner > component (which has the form) and then return a MultiZoneUpdate to update a > part of the page that is not otherwise known by the inner component. > However, I haven't been able to close the window using this method. I > think I might need to trigger a javascript callback (like ChenilleKit's > OnEvent mixin). Any ideas? > > -Nathan > >