While learning GWT, I created a customer widget StateCity (2 drop boxes & a button). It works fine in another GWT app when added to RootPanel in onModuleLoad. The compiler, however, complains, when included in a g:HTMLPanel in TestContainer.ui.xml. In the code below, the compiler gives error. If I comment out lines 1 & 2, and uncomment other lines, it works fine.
[DEBUG] [testgwtsample] - Rebinding com.test.sample.client.TestContainer.TestContainerUiBinder
[DEBUG] [testgwtsample] - Invoking generator com.google.gwt.uibinder.rebind.UiBinderGenerator
[ERROR] [testgwtsample] - Field 'stateCity' does not have an 'addStateChange2Handler' method associated.
[ERROR] [testgwtsample] - Deferred binding failed for 'com.test.sample.client.TestContainer.TestContainerUiBinder'; expect subsequent failures
[ERROR] [testgwtsample] - Unable to load module entry point class com.test.sample.client.TestGWTSample (see associated exception for details)
[ERROR] [testgwtsample] - Failed to load module 'testgwtsample' from user agent 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E; MS-RTC LM 8; McAfee)' at 127.0.0.1:60090
public class TestGWTSample implements EntryPoint
{
public void onModuleLoad()
{
1. final TestContainer testC = new TestContainer();
2. RootPanel.get().add(testC);
/*
final StateCity stateCity = new StateCity();
stateCity.setStates(getStates());
stateCity.addStateChange2Handler(new StateChange2Handler() {
public void onStateChange2 (StateChange2Event ev) {
Window.alert("Event");
}
});
RootPanel.get().add(stateCity);
*/
}
}
I have attached source of both widget (TestGWTWidget.jar) and the test program (TestGWTSample.jar).
Any help will be greatly appreciated.
Thanks,
- Raj
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment