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.