public void render(MarkupWriter writer, RenderQueue queue)
{
// Create an element to contain the content for the zone. We give it a mnemonic
// element name and attribute just to help with debugging (the element itself is discarded).
final Element zoneContainer = writer.element("zone-update", "zoneId", zoneId);
ajaxFormUpdateController.setupBeforePartialZoneRender(writer);
queue.push(new RenderCommand()
{
public void render(MarkupWriter writer, RenderQueue queue)
{
writer.end(); // the zoneContainer element
// Need to do this Ajax Form-related cleanup here, before we extract the zone content.
ajaxFormUpdateController.cleanupAfterPartialZoneRender();
String zoneUpdateContent = zoneContainer.getChildMarkup();
zoneContainer.remove();
reply.getJSONObject("zones").put(zoneId, zoneUpdateContent);
}
});