Dear All,

I am trying to send a "com.google.gwt.visualization.client.Query" to
an URL like this: "https://sample.server/myreportsax/
getReportDatasource.asp?tqx=reqId:123;reporttype:8;param:pid;pid:
101506368". I have tested this using a browser and it returns a valid
JSON response. I am using the Eclipse plugin to compile the Java code
into JS.

When I create a Query with the a.m. URL and send it, the server does
not receive the parameters.
Instead, only "reqId:0" is received.

I tried "RequestBuilder builder = new
RequestBuilder(RequestBuilder.GET, url)" and it worked as expected,
i.e. sent the parameters to the server.

Where am I wrong?

My code:

>>>>>>
public class Google_Visialization_Trial implements EntryPoint {

   public void onModuleLoad() {
        Runnable onLoadCallback = new Runnable() {
          public void run() {
            final Panel panel = RootPanel.get();
            String dataUrl = "https://sample.server/myreportsax/
getReportDatasource.asp?tqx=reqId:123;reporttype:8;param:pid;pid:
101506368";
              Query.Options queryOptions = Query.Options.create();
              queryOptions.setSendMethod(SendMethod.XHR);
              Query query =
Query.create(URL.encode(dataUrl),queryOptions);
              query.send(new Callback() {
                public void onResponse(QueryResponse response) {
                  if (response.isError()) {
                    Window.alert(response.getMessage());
                  } else {
                    DataTable data = response.getDataTable();
                    Options options = createOptions();
                    panel.add(new Table(data, options));
                  }
                }
              });

          }
        };

        VisualizationUtils.loadVisualizationApi(onLoadCallback,
Table.PACKAGE);
      }

      private Options createOptions() {
        Options options = Options.create();
        return options;
      }
}
<<<<<<

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart API" 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-chart-api?hl=en.

Reply via email to