I'm trying implement the DynamicForm call back from this thread by tomsontom: https://code.google.com/p/smartgwt/issues/detail?id=17
I tried the following but the onSubmitComplete doesn't seem to get called at all. I'm not using the EE version.
display.getUploadForm().addFormHandler(new DynamicFormHandler() {
public void onSubmitComplete(DynamicFormSubmitCompleteEvent event) {
System.out.println("submit complete");
String responseString = event.getResults();
System.out.println("Response String is " + responseString);
}
});
// Handler for import button
display.getImportButton().addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
if (display.getUploadForm().validate()
&& display.getImportForm().validate()) {
// set value for the hidden field
display.getUploadForm().setValue(ID,
(String) display.getImportForm().getValue(ID));
display.getImportForm().saveData();
display.getUploadForm().submitForm();
}
}
});
I tried the following but the onSubmitComplete doesn't seem to get called at all. I'm not using the EE version.
display.getUploadForm().addFormHandler(new DynamicFormHandler() {
public void onSubmitComplete(DynamicFormSubmitCompleteEvent event) {
System.out.println("submit complete");
String responseString = event.getResults();
System.out.println("Response String is " + responseString);
}
});
// Handler for import button
display.getImportButton().addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
if (display.getUploadForm().validate()
&& display.getImportForm().validate()) {
// set value for the hidden field
display.getUploadForm().setValue(ID,
(String) display.getImportForm().getValue(ID));
display.getImportForm().saveData();
display.getUploadForm().submitForm();
}
}
});
Comment