List of usage examples for com.google.gwt.user.client.ui FormSubmitCompleteEvent FormSubmitCompleteEvent
public FormSubmitCompleteEvent(FormPanel source, String resultHtml)
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)); } }); } }