I’m currently working on Portlet 2.0 support for Vaadin and I have a preliminary implementation ready for testing in a separate
branch of the Vaadin source tree. Currently, it only works on Liferay 5.2 and it has not been documented yet.
Before the Portlet 2.0 code can be incorporated into the official Vaadin source tree, it has to be tested and this is where you come in. Currently, we have been able to run the address book and sampler applications inside a portlet, with minor modifications.
If you have a portlet application, some time to spare and are comfortable building Vaadin from source, I would very much appreciate it if you could try out the Portlet 2.0 code and report any problems to me. Any comments or feedback can be posted either as replies to this forum post or as comments to
this ticket. Please do not create any new tickets until the Portlet 2.0 code has been incorporated into the official source tree.
There are a few restrictions you have to take into account when developing applications that will be deployed using the new Portlet 2.0 code:
The application URI does not exist and must not be used by the application.
Custom themes and widgetsets must be provided by the portal, they cannot be served by the portlet. For Liferay, this means that the VAADIN-directory must be copied into the webapps/ROOT/html directory.
There may be more restrictions, but this is all I can think of for now. In order to deploy an application, use the following configuration in
portlet.xml :
These steps also work on Ubuntu Linux, provided that you have installed Subversion, curl, Ant and Java 6. In addition, you need to make the following changes to the commands:
I’m working on a new Portlet with Portlet 2.0. I use Liferay 5.2.3 on JBoss.
I would like to use the Events from Portlet 2,0. I will tell you about working or problems.
when i change the application class in portlet.xml from com.vaadin.terminal.gwt.server.ApplicationPortlet to com.vaadin.terminal.gwt.server.ApplicationPortlet2 and implement PortletListener in main Application class, i get an Exception
2010-06-09 06:54:38,296 INFO [STDOUT]
ERROR - javax.portlet.PortletException: Failed to load application class: servletname
javax.portlet.PortletException: Failed to load application class: servletname
at com.vaadin.terminal.gwt.server.ApplicationPortlet2.init(ApplicationPortlet2.java:48)
at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:250)
at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:245)
...
Just a guess: With portlet 1.0, the application parameter refers to web.xml, whereas with portlet 2.0, it should point to the application class. Did you update the application parameter value as well when you updated the portlet class?
Henri thanks,
I’ve read the article, but I probably overlooked this part.
Now I have a Portlet without exeception, but also without contents. Are there also changes with Portlet 2.0? Ich set the height to 400px.
Maybe it would be better to move this discussion to one of the other forum categories, out of “News & Announcements”.
Try to see e.g. with Firebug if the contents are there, but with zero size, or not. It might be that some other layout level has size settings that make it shrink to zero size.
Problem solved!
The following advice could facilitate also the life for different testers.
The portlet.xml is in the documentation well explained, only the example for web.xml is short.
The block must be deleted! The servlet-name in must be equal to portlet name from portlet.xml.
In my portlet.xml, one error is occuring “The class com.vaadin.terminal.gwt.server.ApplicationPortlet2 was not found on the Java Build Path”. Can you tell me which jar i need to install ??
Probably too late, but note that this thread is five years old and for Vaadin 6. Vaadin 7 uses VaadinPortlet. See the book or other sources for more information.