Re: Error on submit form
"mica" <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <1148401883.395077.17430__7790.67344633422$1148402146$gmane$org@y43g2000cwc.googlegroups.com> |
Hello at all. I have found the problem. the problem is very simple, I
can't execute form.submit() outside of event dispatch thread. The
submit() method in nsIDOMHTMLFormElement must be called in SWT event
dispatch thread. If I want to call in a general way, I can do this
public void submit(final nsIDOMHTMLFormElement form){
if(Display.getCurrent() != null) {
//I am in event dispatch thread
form.submit();
}
else {
//I am in other thread
Display.getDefault().syncExec(new Runnable(){
public void run() {
form.submit(); }
});
}
}
Thanks Michal