Example usage for com.google.gwt.user.client.ui FormSubmitCompleteEvent FormSubmitCompleteEvent

List of usage examples for com.google.gwt.user.client.ui FormSubmitCompleteEvent FormSubmitCompleteEvent

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui FormSubmitCompleteEvent FormSubmitCompleteEvent.

Prototype

public FormSubmitCompleteEvent(FormPanel source, String resultHtml) 

Source Link

Document

Creates a new event with information about the source and submit results.

Usage

From source file:org.curriki.gwt.client.widgets.metadata.MetadataEdit.java

License:Open Source License

public void submit() {
    if (!hasMissing()) {
        // replacing form submit with a Curriki GWT API
        // form.submit();

        Map formMap = getFormMap();

        CurrikiService.App.getInstance().updateAssetMetadata(doc.getFullName(), formMap,
                new CurrikiAsyncCallback() {
                    public void onFailure(Throwable caught) {
                        super.onFailure(caught);
                        // let's refresh the state in case of error
                        Editor editor = Main.getSingleton().getEditor();
                        editor.setCurrentAssetInvalid(true);
                        editor.refreshState();
                    }//from   www  .  ja  v  a 2 s  .  c  o  m

                    public void onSuccess(Object result) {
                        super.onSuccess(result);
                        // trigger the form submit complete handler to finish the wizard or save process
                        formHandler.onSubmitComplete(new FormSubmitCompleteEvent(null, null));
                    }
                });
    }
}