| | Vaadin applications in LiferayHere are my experiences using Vaadin and Liferay together. In the upcoming Liferay 5.3 version there is new stuff coming up. Life of a web application developer will become easier. Liferay Europe Symposium 2009Upate 2009-10-16: Presentation slides are now available at liferay.com. Also, you don't need to use the experimental plugin anymore. The Vaadin 6.1.2 and Eclipse plugin 1.0 support all the same stuff (even slightly more easily). Teemu compiled the getting started guide in Liferay.com wiki: 'Developing Vaadin Applications as Liferay Portlets'. I gave a short live demo of how to write a simple Vaadin application and run that in Liferay as a portlet. Here is a screencast of that demo. It has been shortened a bit to fit into YouTube limitations. What I made for before starting was:
Here is the source code for that sample application:
package com.example.docbrowser;
import java.io.File;
import com.vaadin.Application;
import com.vaadin.data.util.FilesystemContainer;
import com.vaadin.event.ItemClickEvent;
import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.terminal.FileResource;
import com.vaadin.ui.*;
public class DocbrowserApplication extends Application implements
ItemClickListener {
private Table table;
@Override
public void init() {
Window mainWindow = new Window("Docbrowser Application");
table = new Table("Documents", new FilesystemContainer(
new File("/book")));
table.setWidth("100%");
table.addListener(this);
mainWindow.addComponent(table);
setMainWindow(mainWindow);
}
public void itemClick(ItemClickEvent event) {
File f = (File) event.getItemId();
Embedded e = new Embedded("", new FileResource(f,
DocbrowserApplication.this));
e.setType(Embedded.TYPE_BROWSER);
e.setSizeFull();
VerticalLayout l = new VerticalLayout();
l.setSizeFull();
l.addComponent(e);
Window w = new Window(f.getName(), l);
w.center();
w.setWidth("90%");
w.setHeight("90%");
getMainWindow().addWindow(w);
}
}
Vaadin Mail PortletAlso take a look at the screencast of the Mail Portlet for Liferay 5.3: To make your 5.2.x Liferay to run Vaadin applications please consult this wiki article about running the Mail Portlet in Liferay.
|