[jboss-cvs] jboss-seam/examples/remoting/gwt/src/org/jboss/seam/example/remoting/gwt/client ...

Shane Bryzak sbryzak at redhat.com
Thu Jun 21 23:46:17 EDT 2007


  User: sbryzak2
  Date: 07/06/21 23:46:17

  Modified:    examples/remoting/gwt/src/org/jboss/seam/example/remoting/gwt/client 
                        AskQuestionWidget.java
  Log:
  white space
  
  Revision  Changes    Path
  1.3       +20 -28    jboss-seam/examples/remoting/gwt/src/org/jboss/seam/example/remoting/gwt/client/AskQuestionWidget.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: AskQuestionWidget.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/remoting/gwt/src/org/jboss/seam/example/remoting/gwt/client/AskQuestionWidget.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- AskQuestionWidget.java	16 Apr 2007 01:47:32 -0000	1.2
  +++ AskQuestionWidget.java	22 Jun 2007 03:46:17 -0000	1.3
  @@ -18,30 +18,30 @@
    */
   public class AskQuestionWidget extends Composite
   {
  -
      private AbsolutePanel panel = new AbsolutePanel();
      
  -   public AskQuestionWidget() {
  -      
  +   public AskQuestionWidget() 
  +   {      
         Label lbl = new Label("OK, what do you want to know?");
         panel.add(lbl);
         final TextBox box = new TextBox();
         box.setText("What is the meaning of life?");
         panel.add(box);
         Button ok = new Button("Ask");
  -      ok.addClickListener(new ClickListener() {
  -
  +      ok.addClickListener(new ClickListener() 
  +      {
            public void onClick(Widget w)
            {
               ValidationUtility valid = new ValidationUtility();
  -            if (!valid.isValid(box.getText())) {
  +            if (!valid.isValid(box.getText())) 
  +            {
                  Window.alert("A question has to end with a '?'");
  -            } else {
  +            } 
  +            else 
  +            {
                  askServer(box.getText());
               }
  -            
            }
  -         
         });
         panel.add(ok);
         
  @@ -51,8 +51,8 @@
      /** Now lets actually go to the server, using a callback - its called Ajax for a reason ! */
      private void askServer(String text)
      {
  -      getService().askIt(text, new AsyncCallback() {
  -
  +      getService().askIt(text, new AsyncCallback() 
  +      {
            public void onFailure(Throwable t)
            {
               Window.alert(t.getMessage());
  @@ -62,26 +62,18 @@
            {
               Window.alert((String) data);
            }
  -         
         });
  -      
      }
      
  -  
      /**
       * This gets the async service client stub. 
       */
  -   private MyServiceAsync getService() {
  -      // define the service you want to call        
  -      MyServiceAsync svc =
  -          (MyServiceAsync) GWT.create(MyService.class);
  -      ServiceDefTarget endpoint = (ServiceDefTarget) svc;
  -      
  +   private MyServiceAsync getService() 
  +   {       
         String endpointURL = GWT.getModuleBaseURL() + "seam/resource/gwt";      
         
  -      endpoint.setServiceEntryPoint(endpointURL);
  +      MyServiceAsync svc = (MyServiceAsync) GWT.create(MyService.class);
  +      ((ServiceDefTarget) svc).setServiceEntryPoint(endpointURL);
         return svc;
  -     
      }
  -   
   }
  
  
  



More information about the jboss-cvs-commits mailing list