Piyush Srivastava
Piyush Srivastava

Reputation: 367

GWT- FormPanel response null on submitcompletehandler

We have a form panel in gwt.

The action of our form panel is set to an aspx page. As per the expected output, the info sent through form panel using POST method, is set into the action aspx page and after the successful response we will be redirected to the action aspx page.

But we receive null from getResults() function of onSubmitCompleteHandler. when we check response value of request Network section of inspect element we found the same result as expected.

Upvotes: 0

Views: 476

Answers (1)

Thomas Broyer
Thomas Broyer

Reputation: 64561

You cannot access the results if you post the form cross-origin.

From the javadoc:

Tip:
    The result html can be null as a result of submitting a form to a different domain.

– Source: http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/FormPanel.SubmitCompleteEvent.html#getResults()

Upvotes: 0

Related Questions