OS X RemoteService Wizard

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

OS X RemoteService Wizard

Postby ba6274 » Wed Jan 30, 2008 3:09 pm

I am happily using the latest GWTDesigner build (2008.01.30) with gwt 1.4.61 for OS X and trying to use the RemoteService wizard. When I create the service the wizard creates the service impl in the server package but does not create the client Async interface. Is this the expected behaviour or am I missing something?

Thanks,
Barry
ba6274
 
Posts: 2
Joined: Fri Jan 18, 2008 5:55 pm

Re: OS X RemoteService Wizard

Postby Eric Clayberg » Wed Jan 30, 2008 7:42 pm

1) Make sure that you are in a GWT Designer project

2) Make sure that you have auto-build enabled in Eclipse

3) Make sure that the Designer > GWT > Create Async interfaces pref is enabled
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: OS X RemoteService Wizard

Postby ba6274 » Thu Jan 31, 2008 7:43 am

Thanks Eric. I created the project using the GWT projectCreator/applicationCreator tools and that was what was holding me back. I use applicationCreator because I use the build/compile scripts that it creates. I am a newb to GWT & Designer, is there a build script I can use if I create the project using Designer?

Thanks,
Barry.
ba6274
 
Posts: 2
Joined: Fri Jan 18, 2008 5:55 pm

Re: OS X RemoteService Wizard

Postby Eric Clayberg » Thu Jan 31, 2008 8:45 am

ba6274 wrote:I am a newb to GWT & Designer, is there a build script I can use if I create the project using Designer?

Docs for creating GWT projects with Designer or converting an existing project into something that GWT Designer recognizes are here.

GWT Designer can only provide build and compilation assistance with projects that it knows about.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: OS X RemoteService Wizard

Postby peterblazejewicz » Fri Feb 01, 2008 10:51 am

ba6274 wrote:Thanks Eric. I created the project using the GWT projectCreator/applicationCreator tools and that was what was holding me back. I use applicationCreator because I use the build/compile scripts that it creates. I am a newb to GWT & Designer, is there a build script I can use if I create the project using Designer?

Thanks,
Barry.

hi Barry,

#1
do exact steps as you do for Eclipse GWT based project as outlined here:
http://code.google.com/webtoolkit/getti ... NewEclipse

#2
import project to Eclipse workspace

#3
convert to GWT project using GWT Designer actions menu (see link posted by Eric),

#4
open generated "MyApplication" entry point:

#5
convert generated code from:

Code: Select all
package com.mycompany.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;

/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class MyApplication implements EntryPoint {

  /**
   * This is the entry point method.
   */
  public void onModuleLoad() {
    final Button button = new Button("Click me");
    final Label label = new Label();

    button.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        if (label.getText().equals(""))
          label.setText("Hello World!");
        else
          label.setText("");
      }
    });

    // Assume that the host HTML has elements defined whose
    // IDs are "slot1", "slot2". In a real app, you probably would not want
    // to hard-code IDs. Instead, you could, for example, search for all
    // elements with a particular CSS class and replace them with widgets.
    //
    RootPanel.get("slot1").add(button);
    RootPanel.get("slot2").add(label);
  }
}


to:

Code: Select all
package com.mycompany.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;

/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class MyApplication implements EntryPoint {

  /**
   * This is the entry point method.
   */
  public void onModuleLoad() {
    // add that line
    final RootPanel rootPanel = RootPanel.get();
    //
    final Button button = new Button("Click me");
    // add some tet to label
    final Label label = new Label("--");

    button.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        if (label.getText().equals(""))
          label.setText("Hello World!");
        else
          label.setText("");
      }
    });
    // modify way widgets are added to panel
    rootPanel.add(button);
    rootPanel.add(label);
  }
}


that is general way to convert any existing GWT project created outside of GWT designer to GWT Designer nature,

regards,
Peter
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Re: OS X RemoteService Wizard

Postby Eric Clayberg » Fri Feb 01, 2008 11:20 am

#6
Use GWT Designer wizards to create new EntryPoints, Composites, etc. ;-)
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests