Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Send XML string to servlet in a hidden variable via http POST not working.

$
0
0
I am trying to send xml file string to server side via a hidden variable buts its breaking up.. If i comment that line it works fine.. Can you let me know what i am missing? I tried hidden, textarea, url.encode, safehtmlutils, Base64 encoding , just to get this value to server side, but it doesnt work... Any help will be greatly appreciated.

Thanks

Posted the same question in stack overflow before finding this forum...

http://stackoverflow.com/questions/2...sed-to-servlet



_____________________________________


String jsonResult = JSONUIHelper.toJson(result);
FormPanel form = new FormPanel();

_log.logMsg(BsLogLvl.DEBUG, "form.start;" + GWT.getModuleBaseURL());
form.setEncoding(FormPanel.ENCODING_MULTIPART);
form.setMethod(FormPanel.METHOD_POST);
form.setAction(GWT.getModuleBaseURL() + "dnldSvc");
Hidden hiddenFileName = new Hidden("fileName", "Atty.zip");
TextArea hiddenJSON = new TextArea();
hiddenJSON.setName("jsonData");
hiddenJSON.setValue(URL.encode(jsonResult));
hiddenJSON.setEnabled(false);
// SafeHTMLUtils.
form.add(hiddenFileName);
form.add(hiddenJSON);
form.submit();
_log.logMsg(BsLogLvl.DEBUG, "after submit();");

form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() {

public void onSubmitComplete(SubmitCompleteEvent event) {

_log.logMsg(BsLogLvl.DEBUG, "after onSubmitComplete;" + event);
}
});

_________________________________

Viewing all articles
Browse latest Browse all 4756

Trending Articles