@PatchMethod
static void submit(FormPanel formPanel) {
FormPanel.SubmitEvent event = new FormPanel.SubmitEvent();
formPanel.fireEvent(event);
if (!event.isCanceled()) {
FormPanelImpl impl = GwtReflectionUtils.getPrivateFieldValue(formPanel, "impl");
Element synthesizedFrame = GwtReflectionUtils.getPrivateFieldValue(formPanel,
"synthesizedFrame");
FormPanel.SubmitCompleteEvent completeEvent = createCompleteSubmitEvent(impl.getContents(synthesizedFrame));
formPanel.fireEvent(completeEvent);
}
}