首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Vaadin 6.8使用vaadin附加组件创建图表

Vaadin 6.8使用vaadin附加组件创建图表
EN

Stack Overflow用户
提问于 2014-10-08 20:52:37
回答 1查看 477关注 0票数 0

希望你是摇滚乐,但我需要一个小帮助。我正在处理vaadin portlet,我需要创建一个vaadin图表(示例)。我下载了所需的jars (vaadin-charts-vaadin6-1.1.7.jar和gson-2.2.1.jar),并创建了一个应用程序,如下所示:

代码语言:javascript
复制
@SuppressWarnings("serial")
public class UserloginchartApplication extends Application {

    public void init() {
        Window window = new Window();

        setMainWindow(window);
        Chart chart = new Chart(ChartType.BAR);

        window.setModal(true);
        window.addComponent(chart);
    }
 }

在tomcat服务器上编译和部署后,我在UI上得到以下错误

Widgetset不包含com.vaadin.addon.charts.Chart的实现。检查它的@ClientWidget映射,widgetsets GWT模块描述文件,并重新编译您的widgetset。如果您已经下载了vaadin附加组件包,您可能需要参考附加组件说明。未呈现的UIDL:-Unrendered UIDL -com.vaadin.addon.charts.Chart(找不到客户端实现) id=PID3 height=400px width=100.0% confState={“-com.vaadin.addon.charts.Chart”:{ "type":"bar“},"series":[],"exporting":{ "enabled":false }}

谁能告诉我步骤,以实现/创建vaadin图表在救生艇。

提前感谢:

-Vikash

EN

回答 1

Stack Overflow用户

发布于 2014-10-08 21:09:42

问题是vaadin.addon.charts有一些客户端小部件没有包含在默认的小部件集中,那么您需要重新编译您的小部件集。如果你使用的是maven like build toll,你可以这样做:

代码语言:javascript
复制
    <plugin>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-maven-plugin</artifactId>
        <version>${vaadin.plugin.version}</version>
        <configuration>
            <gwtSdkFirstInClasspath>true</gwtSdkFirstInClasspath>
            <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
            <!-- <runTarget>mobilemail</runTarget> -->
            <!-- We are doing "inplace" but into subdir VAADIN/widgetsets. This way 
                compatible with Vaadin eclipse plugin. -->
            <webappDirectory>${basedir}/src/main/webapp/VAADIN/widgetsets</webappDirectory>
            <hostedWebapp>${basedir}/src/main/webapp/VAADIN/widgetsets</hostedWebapp>
            <noServer>true</noServer>
            <!-- Remove draftCompile when project is ready -->
            <draftCompile>false</draftCompile>
            <compileReport>true</compileReport>
            <style>OBF</style>
            <strict>true</strict>
            <runTarget>http://localhost:8080/</runTarget>
        </configuration>
        <executions>
            <execution>
                <configuration>
                    <!-- if you don't specify any modules, the plugin will find them -->
                    <!-- <modules> <module>com.vaadin.demo.mobilemail.gwt.ColorPickerWidgetSet</module> 
                        </modules> <gwtSdkFirstInClasspath>true</gwtSdkFirstInClasspath> -->
                </configuration>
                <goals>
                    <goal>resources</goal>
                    <goal>update-widgetset</goal>
                    <goal>compile</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26257385

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档