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
// PageRenderSupport's job). It would be nice if we could agree on the uid, but
// not essential.
String uid = Long.toHexString(System.currentTimeMillis());
IdAllocator idAllocator = new IdAllocator(":" + uid);
FormSupportImpl formSupport = new FormSupportImpl(formId, actions, _clientBehaviorSupport, true,
idAllocator);
_environment.push(FormSupport.class, formSupport);
_environment.push(ValidationTracker.class, new ValidationTrackerImpl());