Liferay Portlet not showing content

Hi,

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.

Can anyone help??

Thx in advance
Stone4000

Hi Christoph,

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.


Developing Vaadin Applications as Liferay Portlets

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.

Christoph

Good point. Teemu, you wrote the wiki page - could you do add a note about this?

Yeah, this sounds like something really worth mentioning in the tutorial wiki page. I’ll edit the tutorial.

Teemu

If you haven’t see this http://vaadin.com/forum/-/message_boards/message/81518, please read it, because I think there are something more to edit.

Thanks
Aniceto

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.

Does someone have still another further idea?

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.

See an example of a portal-ext.properties file in
Developing Vaadin Applications as Liferay Portlets
. Note that typically all three Vaadin parameters in the file should be used together.

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…

Regards
Kolja

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).

Thank you very much.

Regards
Kolja

Hi,

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:

<div class="v-verticallayout" style="overflow: hidden; width: 549px; height: 290px; display: none;">

Obviously display: none hides the content. But why?? and How can I override this unexpected behavior?

Best regards
denu