This is odd and I am probably missing something simple but...
I am using GWT 2.5.1; Eclipse Juno (on Win 7) and target platform is a RedHat box
I have a RequestBuilder that makes a POST request and has a JSONObject returned. This works. The HTTP response returned to the RequestBuilder is:
Content-Type: text/plain; charset=ISO-8859-1
This is slightly edited but shows the issue. The response is an object that contains the "future" object. Future contains an array of objects. Each array element is an object with two fields: show and date. Date is an ISO standard date/time string and show is an HTML's string of info about a concert.
After the RequestBuilder returns, the object is passed to a method that displays the list of shows. This is where the issue arises. The content of each show element is put into an HTML widget. Each HTML widget is added to a panel for display.
Here is one show that has been formatted for easier viewing:
{"show":
"<h4>Vishtèn</h4>
<div id=\"artistImage\">
</div>
<div id=\"venue\">
</div>\n",
"date":"2013-06-27 18:30:00"}
So each show has more than one DIV and the first item is always an H4.
When JSONString/stringValue is passed into an HTML widget the rendered result is:
The first DIV tags are removed while the DIV content remains.
If I change the order of the DIVs the same thing happens to whichever DIV come first.