Design mode fails on RemoteServiceProxy.isStatsAvailable

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

Design mode fails on RemoteServiceProxy.isStatsAvailable

Postby alexzakharov » Fri Jul 17, 2009 12:30 pm

My GWT app runs fine, but designer throws error when I switch to design mode.

I have two composites - A and B. B contains a gridPanel. A contains B among other things.

I want the grid to be loaded when my app starts up. So my constructor for B looks like this:

B()
{
// setup a couple of panels, buttons
//create GridPanel, set its store, column model etc.
initWidget(mainPanel)

loadGrid()

}

Load grid makes an asynchronous call to a remote service and in a callback populates the grid.

When I switch to 'Design' tab of B - I see the grid, everything looks fine.
When I switch to 'Design' tab of A (which contains B) - I get the exception (see below).

Note 1: the app runs fine and the grid is loaded as expected.
Note 2: if I comment out loadGrid() call, the designer no longer throws the exception when I switch to B's 'Design' tab.

Please help.

Here is the exception (UserListPanel is component B described above)

com.instantiations.designer.core.utils.exception.DesignerException: 307 (Exception during constructor evaluation). new UserListPanel() UserListPanel() {} com.google.gwt.core.client.JavaScriptException: (TypeError): '$stats' is undefined
number: -2146823279
description: '$stats' is undefined
at com.google.gwt.user.client.rpc.impl.RemoteServiceProxy.isStatsAvailable(Native Method)
at com.codestreet.web.gwt.admin.client.service.AdminUserService_Proxy.findSalespeople(AdminUserService_Proxy.java:23)
at com.codestreet.web.gwt.admin.client.ui.UserListPanel.loadUsers(UserListPanel.java:111)
at com.codestreet.web.gwt.admin.client.ui.UserListPanel.<init>(UserListPanel.java:73)
at com.instantiations.designer.core.eval.evaluators.InvocationEvaluator.createConstructorProblemException(InvocationEvaluator.java:569)
at com.instantiations.designer.core.eval.evaluators.InvocationEvaluator.evaluate(InvocationEvaluator.java:252)
at com.instantiations.designer.core.eval.evaluators.InvocationEvaluator.evaluate(InvocationEvaluator.java:70)
at com.instantiations.designer.core.eval.ASTEvaluationEngine.evaluate0(ASTEvaluationEngine.java:99)
at com.instantiations.designer.core.eval.ASTEvaluationEngine.evaluate(ASTEvaluationEngine.java:43)
at com.instantiations.designer.core.model.JavaInfoEvaluationHelper.evaluateExpression(JavaInfoEvaluationHelper.java:553)
at com.instantiations.designer.core.model.JavaInfoEvaluationHelper.evaluate(JavaInfoEvaluationHelper.java:428)
at com.instantiations.designer.core.parser.JavaInfoParser.evaluateNode(JavaInfoParser.java:941)
at com.instantiations.designer.core.parser.JavaInfoParser.access$700(JavaInfoParser.java:110)
at com.instantiations.designer.core.parser.JavaInfoParser$ExecutionFlowParseVisitor$2.run(JavaInfoParser.java:422)
at com.instantiations.designer.core.utils.execution.ExecutionUtils.runRethrow(ExecutionUtils.java:64)
at com.instantiations.designer.core.parser.
alexzakharov
 
Posts: 19
Joined: Wed Jun 03, 2009 12:14 pm

Re: Design mode fails on RemoteServiceProxy.isStatsAvailable

Postby Eric Clayberg » Fri Jul 17, 2009 2:15 pm

This is expected behavior at design time. You need to wrapper calls to Remote Services with isDesignTime() checks.

Please see the docs...

http://download.instantiations.com/D2WB ... DesignTime
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: Design mode fails on RemoteServiceProxy.isStatsAvailable

Postby alexzakharov » Fri Jul 17, 2009 2:49 pm

Ah... makes sense. Thank you!
alexzakharov
 
Posts: 19
Joined: Wed Jun 03, 2009 12:14 pm

Re: Design mode fails on RemoteServiceProxy.isStatsAvailable

Postby Eric Clayberg » Sun Jul 19, 2009 9:44 am

Hope that works for you.
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 1 guest