Liferay ServiceBuilder and Vaadin

Hi all!

Please, I’m looking for a basic example to use Liferay ServiceBuilder entities as datasources for Vaadin widgets…

A basic example can be how to populate a Vaadin Table with a List of records returned by Liferay SearchContainer.

Anyone can help me?

Thank you in advance!

Ivano C.

Did you ever get an answer on this. I too would like to see an example or demo.

Its very late but will be useful for some one.
You can use service builder directly as you use in liferay. For example see below code to create a tree view from database.

public class DatabaseUtil {
public static HierarchicalContainer fillTree_db() {
HierarchicalContainer container = new HierarchicalContainer();
ArrayList<ArrayList> treeNodes = new ArrayList<ArrayList>();

	try {
		[color=#f13e3e]

List nodes = TREEVIEWLocalServiceUtil.getAllNodes();
[/color]

		for (TREEVIEW node : nodes) {
			String nodename = node.getNodename();
			ArrayList<String> row = new ArrayList<String>();
			row.add(String.valueOf(node.getNodeid()));
			row.add(node.getNodename());
			row.add(String.valueOf(node.getRootid()));
			container.addItem(nodename);
			treeNodes.add(row);
		}

		for (int i = 0; i < treeNodes.size(); i++) {
			int root = 0;
			root = Integer.parseInt(treeNodes.get(i).get(2));

			if (root != 0)
				container.setParent(treeNodes.get(i).get(1),
						treeNodes.get(root - 1).get(1));
		}

	} catch (Exception e) {
		System.err.println("Exception: " + e.getMessage());
	} finally {
	}
	return container;
}

}

Note: To create a VAADIN framework inside liferay, you can choose Vaadin framework option while creating liferay portlet or if you want to add a vaadin application to existing liferay portlet then create new LIFERAY-VAADIN project and there you can call databaseutil class from vaadin.