i tried to deploy my web application as a liferay portlet, like it is described in the Book of Vaadin.
Unfortunately the portlet does not show any content. Just the frame is displayed. From the
console output i can tell that the init() method of my MainWindow is called.
I also tried to deploy a simple Portlet based on the outcome of the eclipse - generate porlet project
wizard. This portlet works fine, maybe because it only shows a label.
I also tried to change the tutorial project of the Vaadin page to a porlet. But this ends with the same
result than deploying my own application.
I do not get any errors in the console or on the portal pages. LIferay Version is 5.2.
I don’t know what the problem might be in your case, but I’d suggest you to take a look on the tutorial found in the Liferay wiki. It describes how to create a Vaadin application for running as a Liferay Portlet with the help of the Vaadin Eclipse plugin.
Problem is, i started the project as a standard webapplication and now want to change it to a
portlet. i took all steps necessary, described in the Book of Vaadin. I also tried to make a new
project with the eclipse project wizard and change the settings according to my needs.
But unfortunately my project won’t display anything as a portlet, while the init method is called and
no errors are displayed.
It should not be necessary to start the project as portlet project. Try to create a “hello world” portlet project, ensure that it works, see the xml files in WEB-INF and try to add any missing configuration to your existing project.
I did this already. The Hello World Project is also running on Liferay Portal. But i look through the xml. files for 2
days and can’t find any differences (instead the necessary ones)…
Just a guess. Is your applications main layout 100% high? If so, this might be problem as the portlet height might be 0 and 100% of 0 is … way too short. Try to set the main layout height to say “400px” just as a test. If it works, you might want to actually use “undefined” heights to make the portlet to take as much space as your content requires.
Thank you very much. This was the problem… Maybe this can be told somewhere on the
wiki pages, because the tutorial uses 100% height and most of the new users will take this
as a reference.
We have a further problem with Liferay and Vaadin Portlet. Only the portlet frame is shown.
We use Liferay 5.2.3 with JBoss and Apache (with APJ). The Liferay context path is set to /lportal52.
Without Apache AJP and context path the Portlet works! Changing the height has no effect.
Most probably the browser is not able to load the widgetset and the theme for the portlet.
Are you using portal-wide installed shared resources (themes and widgetset)? By default, a Vaadin portlet looks for the resources in /html/VAADIN/…, but the first part (/html) can be customized in the Liferay configuration file portal-ext.properties with the setting vaadin.resources.path.
I seem to experience the same error. But the setHight method seems depricated. How is this intended to be used as a portlet? The tutorial does not drop a single line about this issue, which made me end up comparing my code for about an hour or so as soon as a layout was used in the tutorial…
setHeight(int) is deprecated. Consider using setHeight(String) or setHeight(float, int) instead. setHeight(int) works, but is error-prone since the unit must be set separately (and components might have different default unit).
I’ve got a strange issue in portlet. When other portlet is closed by X button (which is added by liferay) the content of our portlet disappears. The only thing which lefts is title bar with portlet name. Can you maybe know why it could happen?
Best regards
denu
PS.
I’ve firebugged it and i saw that first div under the content div got new style attribute like this: