As part of my GWT application I have a POST method that accepts a file (so I need to use form submission) and returns an updated list of elements as xml. I use the GWT formPanel to do this. The formpanel redirects the results of the post into a separate iframe. Using the dom inspector I can see that the results are actually there. Unfortunately GWT retrieves the results with iframe.contentWindow.document.body.innerHTML
. As my results are sent back using content type text/xml, the xml parser of the browser is used, and obviously html DOM does not apply. I'm stuck now to get to know the correct javascript to get the xml contents.
views:
264answers:
1
A:
The solution was actually easy. Just return iframe.contentWindow.document
and parse the result. Of course that "Document" is a com.google.gwt.dom.client.Document
and not a com.google.gwt.xml.client.Document
. Also, as the frame handle is not visible for children, the whole FormPanel
class needs to be reimplemented (copied).
Paul de Vrieze
2009-09-09 12:54:21