Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DynamicForm and DynamicCallbackForm

    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();

    }
    }
    });

    #2
    In my situation it got called in FireFox but not in IE (8),
    The issue (and solution) was posted as comment 4 by tomsontom;
    http://code.google.com/p/smartgwt/is...etail?id=17#c4

    For IE support

    In your gwt.xml you need to set:
    Code:
    <replace-with class="at.bestsolution.gwt.util.impl.DynamicCallbackFormImpl">
       <when-type-is class="at.bestsolution.gwt.util.impl.DynamicCallbackFormImpl"/>
    </replace-with>
    
    <replace-with class="at.bestsolution.gwt.util.impl.DynamicCallbackFormImplIE6">
       <when-type-is class="at.bestsolution.gwt.util.impl.DynamicCallbackFormImpl"/>
       <when-property-is name="user.agent" value="ie6"/>
    </replace-with>
    This seems to work for IE8 to.
    Last edited by meindert; 4 Aug 2010, 02:00.

    Comment

    Working...
    X