加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java – Vaadin 7.1.1:无法加载widgetset

发布时间:2020-05-25 00:48:42 所属栏目:Java 来源:互联网
导读:运行最新的Vaadin 7.1.1应用程序时遇到问题.这主要是因为我找不到该版本的文档. Maven原型创建扩展Root的旧式应用程序. Root已经不见了,所以我试图扩展UI,就像在Book of Vaadin中那样. web.xml中: servlet servlet-namemyservlet/servlet-name servlet-class

运行最新的Vaadin 7.1.1应用程序时遇到问题.这主要是因为我找不到该版本的文档. Maven原型创建扩展Root的旧式应用程序. Root已经不见了,所以我试图扩展UI,就像在Book of Vaadin中那样.

web.xml中:

<servlet>
    <servlet-name>myservlet</servlet-name>
    <servlet-class>
        com.vaadin.server.VaadinServlet
    </servlet-class>

    <init-param>
        <param-name>UI</param-name>
        <param-value>cz.simplecoin.simplegui.MainScreen</param-value>
    </init-param>
</servlet>

和MainScreen简单地说:

public class MainScreen extends UI {

项目正确编译(使用maven).当我调试时,我看到MainScreen的init方法被正确调用,但我看到只有空白屏幕(引导JavavScript在那里)和警报:

错误:

无法加载widgetset:./ VAADIN / widgetsets / com.vaadin.DefaultWidgetSet / com.vaadin.DefaultWidgetSet.nocache.js?1393503103223

我想从Default widgetset开始.我几乎可以肯定,它在maven构建/依赖中存在某种问题.我不知道要使用哪些库:我尝试了两种变体(已评论)

pom.xml中:

<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-server</artifactId>
    <version>${vaadin.version}</version>
</dependency>
<!--
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-themes</artifactId>
    <version>${vaadin.version}</version>
</dependency>
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-client</artifactId>
    <version>${vaadin.version}</version>
</dependency>
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-client-compiler</artifactId>
    <version>${vaadin.version}</version>
</dependency>
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-theme-compiler</artifactId>
    <version>${vaadin.version}</version>
</dependency>
<dependency>
    <groupId>com.vaadin.addon</groupId>
    <artifactId>vaadin-charts</artifactId>
    <version>1.0.0</version>
</dependency>
-->

我可能会尝试使用自己的widgetset,看看是否能解决问题.

解决方法

好吧,我最终通过从git直接调整最新的演示应用程序pom.xml得到了它.缺少widgetset
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-client-compiled</artifactId>
    <version>${vaadin.version}</version>
</dependency>

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读