gwt运行时报错

zr_dixuexiongying 2012-12-29 01:03:05
大家好!

请教大家一个问题!我在运行gwt-ext中的例子时报错!程序:

package cn.itcast.button.client;

import com.google.gwt.core.client.EntryPoint;

import com.google.gwt.user.client.ui.RootPanel;
import com.gwtext.client.widgets.CycleButton;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.event.CycleButtonListenerAdapter;
import com.gwtext.client.widgets.menu.CheckItem;

public class TestButton implements EntryPoint{

public void onModuleLoad(){
Panel panel = new Panel();
panel.setPaddings(5);
panel.setBorder(false);

CycleButton button = new CycleButton();
button.setShowText(true);
button.setPrependText("View as");

button.addItem(new CheckItem("text only",true));
button.addItem(new CheckItem("HTML",false));

button.addListener(new CycleButtonListenerAdapter(){
public void onChange(CycleButton self,CheckItem item){
System.out.println(item.getText()+" selected.");
}
});
panel.add(button);

RootPanel.get().add(panel);
}
}

运行时刚开始时是找不到网页,报404找不到TestButton.html的页面,而且我明明是有这个页面的,过了一段时间重新打开项目,又是报其他的错误,真是令人费解,不知道原因到底出在哪里!望各位高手不吝赐教!报错信息:

00:32:42.470 [TRACE] [testbutton] Finding entry point classes

00:32:42.475 [ERROR] [testbutton] Errors in 'file:/F:/workspace/TestButton/src/cn/itcast/button/client/TestButton.java'

[ERROR] [testbutton] - Line 13: No source code is available for type com.gwtext.client.widgets.Panel; did you forget to inherit a required module?

[ERROR] [testbutton] - Line 17: No source code is available for type com.gwtext.client.widgets.CycleButton; did you forget to inherit a required module?

[ERROR] [testbutton] - Line 21: No source code is available for type com.gwtext.client.widgets.menu.CheckItem; did you forget to inherit a required module?

[ERROR] [testbutton] - Line 24: No source code is available for type com.gwtext.client.widgets.event.CycleButtonListenerAdapter; did you forget to inherit a required module?

[ERROR] [testbutton] - Unable to find type 'cn.itcast.button.client.TestButton'

[ERROR] [testbutton] - Hint: Previous compiler errors may have made this type unavailable

[ERROR] [testbutton] - Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly

00:32:42.602 [ERROR] [testbutton] Failed to load module 'testbutton' from user agent 'Mozilla/4.0 (compatible; MSIE 7.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; .NET4.0C; .NET4.0E)' at 127.0.0.1:54599


...全文
137 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
tank416 2014-03-31
  • 打赏
  • 举报
回复
[ERROR] [testbutton] - Unable to find type 'cn.itcast.button.client.TestButton'

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧