i tested the RequestBuilder class,it does not work.


                final RequestBuilder rb = new 
RequestBuilder(RequestBuilder.POST,
                                
"http://code.google.com/intl/zh-CN/webtoolkit/doc/1.6/tutorial/
RPC.html");
                rb.setCallback(new RequestCallback() {
                        public void onResponseReceived(Request request, 
Response response)
{
                                
Window.alert(String.valueOf(response.getStatusCode()));
                                if (response.getStatusCode() == 200) {
                                        Window.alert(response.getText());
                                }
                        }

                        @Override
                        public void onError(Request request, Throwable 
exception) {

                        }
                });

                Button btn = new Button();
                RootPanel.get().add(btn);
                btn.addClickHandler(new ClickHandler() {
                        @Override
                        public void onClick(ClickEvent event) {
                                try {
                                        rb.send();
                                } catch (RequestException e) {
                                        e.printStackTrace();
                                }
                        }
                });

-- 
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