它开辟了新的窗口,但使用GWT不通过邮政参数新窗口。
final RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, encodedUrl);
rb.setHeader("Content-type", "application/x-www-form-urlencoded");
rb.setRequestData(json);
Request response = rb.sendRequest(json.toString(), new RequestCallback() {
public void onError(Request request, Throwable exception) {}
public void onResponseReceived(Request request, Response response) {
Window.open(rb.getUrl(), postTarget, postWinFeatures);
}
});
FormPanel中形成=新FormPanel中(目标);
form.setMethod(FormPanel.METHOD_POST);
form.setEncoding(FormPanel.ENCODING_URLENCODED);
Hidden params0 = new Hidden("dds", "xyz");
Hidden params1 = new Hidden("sdsdsd", "sdsd");
Hidden params2 = new Hidden("sdsd", "sdsdd");
FlowPanel panel = new FlowPanel();
panel.add(params0);
panel.add(params1);
panel.add(params2);
form.add(panel);
//form.add(buildPostURLParameter());
form.setAction(buildPostURL());
RootPanel.get().add(form);
form.submit();