I was just about to post a question about ScriptTagProxy not working
but I then found the solution. I thought I'd share lessons learned.
1) The client throws an exception after it times out but it never
explains why. onLoad never runs, so don't bother.
2) Set your timeout to 3000 so you can get an error right away if it
doesn't work, rather than the 30,000 default (30 seconds)
3) Use a test.jsp file on your local server first to eliminate
dependencies.
4) You can hardcode the callback function to be stcCallback1001 if
you're refreshing. The second call will be stcCallback1002 and so on.
This allows you to create a static JSON file to eliminate further
dependencies.
5) Define a status variable and make sure your json status matches
your JsonReader configuration. I did this: reader.setSuccessProperty
("status");
6) The status is a boolean! The docs never explain that part. If it's
not set to true, nothing will work...at all !!
7) If your JSON isn't formed right, you'll get a timeout exception
like in step 1. Start with a very simple JSON you know is correctly
formed.
8) I was able to get the JSON to work in plain text/html. I kept
thinking there was something wrong with my headers but they were fine.
Hopefully, this will help someone else, who doesn't want to waste 10
hours.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---