Search in sources :

Example 1 with FormPanelImpl

use of com.google.gwt.user.client.ui.impl.FormPanelImpl in project gwt-test-utils by gwt-test-utils.

the class FormPanelPatcher method submit.

@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(getResultsHtml(impl, synthesizedFrame));
        formPanel.fireEvent(completeEvent);
    }
}
Also used : FormPanel(com.google.gwt.user.client.ui.FormPanel) SubmitCompleteEvent(com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent) FormPanelImpl(com.google.gwt.user.client.ui.impl.FormPanelImpl) Element(com.google.gwt.dom.client.Element) PatchMethod(com.googlecode.gwt.test.patchers.PatchMethod)

Aggregations

Element (com.google.gwt.dom.client.Element)1 FormPanel (com.google.gwt.user.client.ui.FormPanel)1 SubmitCompleteEvent (com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent)1 FormPanelImpl (com.google.gwt.user.client.ui.impl.FormPanelImpl)1 PatchMethod (com.googlecode.gwt.test.patchers.PatchMethod)1