2014-10-08 63 views
0

希望你在摇摆你的尽头,但我需要一点帮助。 我正在使用vaadin portlet,我需要创建一个vaadin图表(示例)。 我下载需要的jar(vaadin-图表-vaadin6-1.1.7.jar和GSON-2.2.1.jar),并创建 下面举一个应用程序:Vaadin 6.8用vaadin加载项创建图表

@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映射,widgetset GWT模块描述文件并重新编译你的widgetset。如果您已下载vaadin附加软件包,则可能需要参阅附加组件说明。 Unrendered UIDL: -Unrendered UIDL -com.vaadin.addon.charts.Chart(NO CLIENT IMPLEMENTATION FOUND)id = PID3 height = 400px width = 100.0%confState = {“chart”:{“type”:“bar”} ,“系列”:[],“导出”:{“enabled”:false}}

任何人都可以告诉我在Liferay中实现/创建vaadin图表的步骤。

在此先感谢:

-Vikash

回答

0

的问题是,vaadin.addon.charts具有不包含在默认某些客户端插件widge设置,那么你需要重新编译你的小窗口组。如果您使用的是像建设收费行家,你可以这样做:

<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

感谢,但我不使用maven.I重新编译部件从控制面板上设置,现在我没有得到上面提到的错误,但仍即使没有错误或异常,我也无法在UI上看到图表。 – 2014-10-08 13:25:46

+0

你正在使用什么样的系统构建? – Skizzo 2014-10-08 14:07:28

+0

嗨Skizzo, 感谢您的答复。 我正在使用ant构建。 – 2014-10-08 14:12:33