0

Hope you are rocking at your end but i need a small help. I am working on vaadin portlet and i need to create a vaadin chart(sample). I downloaded required jars (vaadin-charts-vaadin6-1.1.7.jar and gson-2.2.1.jar) and created an application as give below:

@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);
    }
 }

After compiling and deploying on tomcat server i am getting following error on UI

Widgetset does not contain implementation for com.vaadin.addon.charts.Chart. Check its @ClientWidget mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions. Unrendered UIDL: -Unrendered UIDL -com.vaadin.addon.charts.Chart(NO CLIENT IMPLEMENTATION FOUND) id=PID3 height=400px width=100.0% confState={ "chart": { "type": "bar" }, "series": [], "exporting": { "enabled": false } }

Can any one tell me steps to achieve/create vaadin chart in liferay.

Thanks in Advance:

-Vikash

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154

1 Answers1

0

The problem is that the vaadin.addon.charts has some client side widget that are not included in default widge-set then you need to recompile your widget-set. If you are using maven like build toll you can do in this way:

    <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>
Skizzo
  • 2,883
  • 8
  • 52
  • 99