I've been trying this for a few days now with no luck.
final FormPanel form = new FormPanel(new NamedFrame("test"));
form.setAction("/designer");
form.setMethod(FormPanel.METHOD_POST);
VerticalPanel panel = new VerticalPanel();
form.setWidget(panel);
final TextBox tb = new TextBox();
tb.setName("style");
panel.add(tb);
panel.add(new Button("Submit", new ClickHandler() {
public void onClick(ClickEvent event) {
Window.alert("submitting to:" + form.getTarget());
form.submit();
}
}));
form.addSubmitCompleteHandler(new SubmitCompleteHandler() {
public void onSubmitComplete(SubmitCompleteEvent event) {
Window.alert("complete");
Window.alert(event.getResults());
}
});
In Hosted Mode, nothing happens after the "Submitting to" alert fires. In Chrome, the form loads in a separate tab, but the POST itself is empty. In Firefox and IE, again, nothing happens after the alert. Any ideas?
I've set up a servlet at /designer that outputs the request header and body from any page requests. I can hit this servlet from a plain HTML page and see the expected output. From GWT, no request ever appears (except for Chrome, in which the request shows up, but with an empty body).