Friday 19 October 2012

Vaadin portlet and Liferay

Hello,
    This post I'll start some set of articles related Vaadin and Liferay. Vaadin allows you build rich internet application by writing Java code.

In the beginnig, few words related creation and working with Vaadin portlets.
    To create portlet simply use LiferayIDE, it will generate necessary project. The main difference, in portlet.xml:
 
  ...
  com.vaadin.terminal.gwt.server.ApplicationPortlet2
  
   application
   com.paul.my.vaadin.MyVaadinApplication
  
  ...
 
                 as you can see for portlet class used ApplicationPortlet2 with init param you main   application class:
public class MyVaadinApplication extends Application {
   public void init() {
    Window window = new Window();
    setMainWindow(window);
    Label label = new Label("Hello MyVaadin!");
    window.addComponent(label);
   }
  }
   To deploy portlet use build.xml    



   Full description can be found here.

    Vaadin has lot of components which you can use, here you can find some examples. In some cases you might require additional components, they can be found here. For using this components with Liferay you will need to follow some steps, bassicaly it is:
    1) Download component jar.
    2) Put it to portlet lib folder
    3) Put it to webapps/ROOT/lib or use liferay-plugin-package.properties
    4) Build widgetsets with Vaadin control panel for liferay.
    Detailed you can check here.

BR, Paul Butenko

No comments:

Post a Comment