Example don't work

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

Example don't work

Postby Eugenio » Tue Oct 16, 2007 9:00 am

I try to compile this example:

http://download.instantiations.com/Desi ... ml#Example

but this don't work!!!

Code: Select all

private void fillPersons() {
        PersonsService.Util.getInstance().getPersons(m_txtFilter.getText(), new AsyncCallback() {
            public void onSuccess(Object result) {
                List persons = (List) result;
                m_grid.resize(1 + persons.size(), 2);
                int row = 1;
                for (Iterator I = persons.iterator(); I.hasNext();row++) {
                    Person person = (Person) I.next();
                    m_grid.setWidget(row, 0, new Label(person.getFirstName()));
                    m_grid.setWidget(row, 1, new Label(person.getLastName()));
                }
            }
            public void onFailure(Throwable caught) {
               System.out.print("Error");
            }



In this function I have an error!!!
the application return onFaluire method!!!

why the appliction call onFailed rathed than onSuccess?

I have done copy and paste from example!!!!
Eugenio
 
Posts: 8
Joined: Tue Oct 16, 2007 8:43 am

Postby Alexander.Mitin » Tue Oct 16, 2007 10:13 am

Eugenio,

Please replace
Code: Select all
System.out.print("Error");
with
Code: Select all
caught.printStackTrace();
and let us know what the stack trace says.
Also make sure that your module_name.gwt.xml (resides in public folder) contains valid references to PersonsService.
Alexander Mitin
Alexander.Mitin
Moderator
 
Posts: 155
Joined: Fri Jan 19, 2007 3:57 am

Postby Eric Clayberg » Tue Oct 16, 2007 12:57 pm

Also make sure that your module_name.gwt.xml (resides in public folder) contains valid references to PersonsService.

Yes. Make sure that you are using the Remote Service wizard to create the Remote Service.

Image

If you haven't done so, you should watch the Remote Service flash movie.

Image
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

Postby Eugenio » Wed Oct 17, 2007 12:19 am

Ok thanks!!! now work!!!

the problem was in module_name.gwt.xml
Eugenio
 
Posts: 8
Joined: Tue Oct 16, 2007 8:43 am

Postby Eric Clayberg » Wed Oct 17, 2007 7:34 am

Eugenio wrote:Ok thanks!!! now work!!!
the problem was in module_name.gwt.xml

Good news!
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