On Jan 26, 12:43 pm, "[email protected]"
<[email protected]> wrote:
> once again, i have to answer the question myself!
> at first: would anyone PLEASE write an guide for using the
> jsonprequestbuilder!!!! it´s damn annoing the find out everything by
> try and error.
>
> about my problem:
> the name of the callback method for the jsonp request changes whith
> every request.
> when you do the first request the name is: __gwt_jsonp__.I0.onSuccess
> for the second request: __gwt_jsonp__.I1.onSuccess
> for the third: __gwt_jsonp__.I2.onSuccess
> ...
>
> that definetly make sense, BUT is nowhere noted in the
> documentation!!!!!
> and - belive it or not - you can see this little change from one
> request to another very hard when you look at a couple of requests.

The javadoc for JsonpRequestBuilder starts with:
"""The server will receive a request including a callback url
parameter, which should be used to return the response as following:

<callback>(<json>);

where <callback> is the url parameter (see setCallbackParam
(String)),"""

It's clear to me that the URL will contain a query string with a
parameter like "callback=fnName" (where 'callback' is the value you
passed to setCallbackParam, and 'fnName' is the <callback>, i.e. the
function name to "call").
It even comes with an example of calling a GData API (with a link to
the GData API documentation that explains what "?alt=json-in-script"
means)

Maybe you should first read some doc about JSON-P, such as
http://en.wikipedia.org/wiki/JSON#JSONP

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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/google-web-toolkit?hl=en.

Reply via email to