尝试使用gwt cal和gwt dnd时出错

尝试使用gwt cal和gwt dnd时出错,gwt,Gwt,我有一个简单的GWT项目,我试图使用小部件,但当我尝试加载使用小部件的页面时,我会出错 我按照说明使用gwt cal小部件,但它不起作用。我有gwt cal的0.9.3版,gwt dnd的3.1.2版,我正在使用gwt 2.4 下面是我使用gwt cal小部件的页面: public class ClientCalendarPage extends Composite { private VerticalPanel mainPanel = new VerticalPanel(); private

我有一个简单的GWT项目,我试图使用小部件,但当我尝试加载使用小部件的页面时,我会出错

我按照说明使用gwt cal小部件,但它不起作用。我有gwt cal的0.9.3版,gwt dnd的3.1.2版,我正在使用gwt 2.4

下面是我使用gwt cal小部件的页面:

public class ClientCalendarPage extends Composite {

private VerticalPanel mainPanel = new VerticalPanel();
private Calendar calendar;

public ClientCalendarPage() {
    CalendarSettings settings = new CalendarSettings();
    settings.setEnableDragDropCreation(false);
    settings.setEnableDragDrop(false);

    calendar = new Calendar();
    calendar.setSettings(settings);
    calendar.setDate(new Date()); // calendar date, not required
    calendar.setDays(3); // number of days displayed at a time, not required
    calendar.setWidth("500px");
    calendar.setHeight("400px");

    Appointment appt = new Appointment();
    appt.setStart(new Date(System.currentTimeMillis() + 86400000));
    appt.setEnd(new Date(System.currentTimeMillis() + 90000000));
    appt.setTitle("Test");
    appt.setStyle(AppointmentStyle.BLUE);
    calendar.addAppointment(appt);

    mainPanel.add(calendar);

    initWidget(mainPanel);
}
 }
以下是我的app.gwt.xml:

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='minoscrossfit'>
 <inherits name='com.google.gwt.user.User'/>
 <inherits name='com.google.gwt.user.theme.clean.Clean'/>                                   
 <inherits name='com.bradrydzewski.gwt.calendar.Calendar' />
 <inherits name='com.bradrydzewski.gwt.calendar.theme.google.Google' />
 <inherits name='com.allen_sauer.gwt.dnd.gwt-dnd'/>
 <entry-point class='com.afrsoftware.minoscrossfit.client.MinosCrossfit'/>
 <source path='client'/>
 <source path='shared'/>
</module>

有人知道我做错了什么吗?

我发现了问题。我的项目中缺少一些区域设置。我更改了app.gwt.xml,它成功了。我用文档解决了这个问题

下面是我的app.gwt.xml现在的样子:

<?xml version="1.0" encoding="UTF-8"?>
 <module rename-to='minoscrossfit'>
  <inherits name='com.google.gwt.user.User'/>
  <inherits name="com.google.gwt.i18n.I18N"/>
  <extend-property name="locale" values="fr"/>
  <extend-property name="locale" values="fr_CA"/>
  <extend-property name="locale" values="en"/>
  <inherits name='com.google.gwt.user.theme.clean.Clean'/>                                     
  <inherits name='com.bradrydzewski.gwt.calendar.Calendar' />
  <inherits name='com.bradrydzewski.gwt.calendar.theme.google.Google' />
  <inherits name='com.allen_sauer.gwt.dnd.gwt-dnd'/>
  <entry-point class='com.afrsoftware.minoscrossfit.client.MinosCrossfit'/>
  <source path='client'/>
  <source path='shared'/>
 </module>

eclipse中的一个小项目->清理似乎帮助解决了我的问题


在更改app.gwt.xml之后,我添加了一个类似的问题,这是因为我的团队中有人(可能是我)提交了一个不应该提交的文件(nocache.js),所以项目中使用的新JAR不在该文件中。更改app.gwt.xml引发了应用程序的重新编译,并生成了一个新的nocache.js文件(包含JAR中所需的所有函数)。

您在开发模式下使用的Web浏览器是什么?你确定你有正确版本的GWT浏览器插件吗?我正在使用Chrome浏览器,该插件是最新的。今天早上我在firefox上试用了我的应用程序,它成功了。在那之后,我尝试在另一台计算机上检查我的项目,以确保它正常工作,但它不是(在任何具有最新插件的浏览器上)我遇到了相同的问题,但是我无法使用参考链接上的方向来修复它。在我的代码中,我使用了
param.toLowerCase(Locale.ENGLISH)
,其中param是一个字符串。我想它应该按照你说的去做。有什么想法吗?
<?xml version="1.0" encoding="UTF-8"?>
 <module rename-to='minoscrossfit'>
  <inherits name='com.google.gwt.user.User'/>
  <inherits name="com.google.gwt.i18n.I18N"/>
  <extend-property name="locale" values="fr"/>
  <extend-property name="locale" values="fr_CA"/>
  <extend-property name="locale" values="en"/>
  <inherits name='com.google.gwt.user.theme.clean.Clean'/>                                     
  <inherits name='com.bradrydzewski.gwt.calendar.Calendar' />
  <inherits name='com.bradrydzewski.gwt.calendar.theme.google.Google' />
  <inherits name='com.allen_sauer.gwt.dnd.gwt-dnd'/>
  <entry-point class='com.afrsoftware.minoscrossfit.client.MinosCrossfit'/>
  <source path='client'/>
  <source path='shared'/>
 </module>