Я пытаюсь создать проект GWT, используя Maven и SmartGWT.Модуль GWT, который я сделал, работал нормально, поэтому я попытался создать следующую EntryPoint для SmartGWT.
@Override
public void onModuleLoad() {
final DynamicForm form = new DynamicForm();
form.setWidth(500);
form.setNumCols(4);
ComboBoxItem bugStatusItem = new ComboBoxItem("bugStatus");
bugStatusItem.setTitle("Bug Status");
LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>();
valueMap.put("new", "New");
valueMap.put("active", "Active");
valueMap.put("revisit", "Revisit");
valueMap.put("fixed", "Fixed");
valueMap.put("delivered", "Delivered");
valueMap.put("resolved", "Resolved");
valueMap.put("reopened", "Reopened");
bugStatusItem.setValueMap(valueMap);
form.setItems(bugStatusItem);
form.draw();
}
Но когда я открываюсь в Chrome (с помощью Ubuntu x64), я вижу следующее ...
http://127.0.0.1:8888/Header.html:
GWT module 'com.gleason.ecommerce.textmanagement.gwt.Header' may need to be (re)compiled
http://127.0.0.1:8888/Header.html?gwt.codesvr=127.0.0.1:9997
00:19:55.205 [ERROR] Unable to load module entry point class
com.smartgwt.client.SmartGwtEntryPoint (see associated exception for details)
com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot read property 'Browser' of undefined at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248) at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289) at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107) at
com.smartgwt.client.SmartGwtEntryPoint.init(SmartGwtEntryPoint.java) at
com.smartgwt.client.SmartGwtEntryPoint.onModuleLoad(SmartGwtEntryPoint.java:239) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at
java.lang.reflect.Method.invoke(Method.java:597) at
com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396) at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200) at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525) at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363) at
java.lang.Thread.run(Thread.java:662)
Я попробовал gwt: compile, но это не помогло.
Спасибо, ребята!