if (!callback.isAborted()) return null;
// Here's where it gets very, very tricky.
final RenderCommand rootRenderCommand = _pageRenderQueue.getRootRenderCommand();
final String formId = _request.getParameter(FORMID_PARAMETER);
final Base64ObjectOutputStream actions = new Base64ObjectOutputStream();
final RenderCommand cleanup = new RenderCommand()
{
public void render(MarkupWriter writer, RenderQueue queue)
{
try
{
actions.close();
}
catch (IOException ex)
{
throw new RuntimeException(ex);
}
_environment.pop(ValidationTracker.class);
FormSupportImpl formSupport = (FormSupportImpl) _environment.pop(FormSupport.class);
formSupport.executeDeferred();
writer.element("input",
"type", "hidden",
"name", Form.FORM_DATA,
"value", actions.toBase64());
}
};
final RenderCommand setup = new RenderCommand()
{
public void render(MarkupWriter writer, RenderQueue queue)
{
// Kind of ugly, but the only way to ensure we don't have name collisions on the
// client side is to force a unique id into each name (as well as each id, but that's