Foren

Example of Liferay and Vaadin integration - newsletter portlet

Tomek Lipski, geändert vor 12 Jahren.

Example of Liferay and Vaadin integration - newsletter portlet

Junior Member Beiträge: 32 Beitrittsdatum: 17.11.10 Neueste Beiträge
Hi all,

I have started a series of blog articles concerning development of Vaadin-based portlets for Liferay. On the example of (yet another) newsletter portlets bundle I will try to explain how to create enterprise-grade solutions for Liferay (using Vaadin of course!) in mere hours.

The blog is available here: http://www.bluesoft.net.pl/en/web/tlipski/blog

For the impatient: the mentioned newsletter application is available under GNU LGPL on GitHub: https://github.com/tlipski/newsletter-for-liferay

As the comments on the blog are currently disabled, feel free to post any sugestions or ideas in this forum thread.
thumbnail
Cédric Briançon, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

New Member Beiträge: 17 Beitrittsdatum: 28.10.10 Neueste Beiträge
Hi Tomek,
great development emoticon

I've tried your portlet on my Liferay 6.0.6 instance, tables are generated in my database and the menu appears in the admin interface, but I get nothing in the right part of the admin interface. Isn't it supposed to present the newsletter administration in the admin interface of Liferay?

Regards,
Cédric
thumbnail
David H Nebinger, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
Try manually refreshing the page; I've had that work sometimes w/ vaadin portlets...
thumbnail
Cédric Briançon, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

New Member Beiträge: 17 Beitrittsdatum: 28.10.10 Neueste Beiträge
Hi,

I had to configure in portal-ext.properties "vaadin.resources.path=/mycontext/html", where mycontext is the same as the value for the property "portal.ctx", because my portal is not deployed on the root context. With that configuration, it works perfectly emoticon

Great job,
Cédric
Tomek Lipski, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

Junior Member Beiträge: 32 Beitrittsdatum: 17.11.10 Neueste Beiträge
Cédric, I am glad to hear that you have worked it out.

The newsletter portlet sample has been developed and tested on vanilla Liferay CE 6.0.6 installation package (tomcat + hsqldb) with default configuration options (although I have taken the liberty to remove most of the web-apps provided in the installation package to increase Tomcat startup time), but due to technologies used (mostly Hibernate and Liferay), it should work with multitude of deployment configurations - database and application servers.

Also, I have added another article about Newsletter Portlets for Liferay, describing the inner workings of Subscription Portlet. The article is available at http://www.bluesoft.net.pl/en/web/tlipski/blog/-/blogs/newsletter-for-liferay-subscription-portlet.
thumbnail
Cédric Briançon, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

New Member Beiträge: 17 Beitrittsdatum: 28.10.10 Neueste Beiträge
Tomek Lipski:

The newsletter portlet sample has been developed and tested on vanilla Liferay CE 6.0.6 installation package (tomcat + hsqldb) with default configuration options (although I have taken the liberty to remove most of the web-apps provided in the installation package to increase Tomcat startup time), but due to technologies used (mostly Hibernate and Liferay), it should work with multitude of deployment configurations - database and application servers.

Indeed, it works perfectly on a PostgreSQL database too with Tomcat and Liferay 6.0.6 CE, just by configuring the hibernate.cfg.xml file in resources to use my pgsql database.

Kind regards,
Cédric
thumbnail
Wilson Silva, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

New Member Beiträge: 19 Beitrittsdatum: 09.06.11 Neueste Beiträge
I'm trying to compile the source provided in the github but with no success. Which project do I have to create to complile the source? Everytime I try to create a Vaadin project I get this error:



(In case you can't see the image anymore: At least SDK version 6.1.0 is required to use the selected portlet framework.)
My Liferay version is 6.0.6, the Vaadin version is 6.6.3 and the Vaadin Plugin for Eclipse version is 2.0.1

I've also tried to create a Vaadin Project but I can't merge it with the provided source. Any ideas? Is there a compiled version available?
Tomek Lipski, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

Junior Member Beiträge: 32 Beitrittsdatum: 17.11.10 Neueste Beiträge
Hi,

This project was developed using maven (see https://github.com/tlipski/newsletter-for-liferay/blob/master/pom.xml for more details). The simplest way to compile is to install maven2 and run:

 mvn package


in the command line.

Therefore you should have appropriate .war file in target subdirectory. Anyway I have attached the compiled blue-newsletter-0.1.war file to this post - just remember to update hibernate.cfg.xml according to your database setup. Use of newer version of Vaadin widgetset is also recommended - since February, Vaadin guys made a lot of significant improvements emoticon

If you have any further problems compiling, do not hesitate to post them here or just send me a message.
thumbnail
David H Nebinger, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
Wilson Silva:
I'm trying to compile the source provided in the github but with no success. Which project do I have to create to complile the source? Everytime I try to create a Vaadin project I get this error:


Create an MVC portlet plugin. Then right-click on your project and add a Vaadin portlet. It will work fine, even with 6.0.6...
thumbnail
Wilson Silva, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

New Member Beiträge: 19 Beitrittsdatum: 09.06.11 Neueste Beiträge
Thanks for this portlet and for your help. I've translated the portlet messages to Portuguese (Portugal). The translation follows the Portuguese Language Orthographic Agreement of 1990 which was approved in 2008. I am following the portlet repository but if you plan to add new functionality to the portlet let me know and I will update the portuguese resources file.
Alina Doca, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

New Member Beiträge: 4 Beitrittsdatum: 19.09.11 Neueste Beiträge
Hi,

I am trying to use the newsletter portlet you mentioned above, from Bluesoft. However, on the admin section I get an error:
Widgetset does not contain implementation for com.vaadin.ui.TextArea. Check its @ClientWidget mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions. Unrendered UIDL:
com.vaadin.ui.TextArea(NO CLIENT IMPLEMENTATION FOUND

I have replaced vaadin jar with the newer version 6.5.4, but this is still not working.
Any idea why?

Thanks a lot
Paolo Pilitti, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

Junior Member Beiträge: 51 Beitrittsdatum: 13.04.11 Neueste Beiträge
Alina Doca:
Hi,

I am trying to use the newsletter portlet you mentioned above, from Bluesoft. However, on the admin section I get an error:
Widgetset does not contain implementation for com.vaadin.ui.TextArea. Check its @ClientWidget mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions. Unrendered UIDL:
com.vaadin.ui.TextArea(NO CLIENT IMPLEMENTATION FOUND

I have replaced vaadin jar with the newer version 6.5.4, but this is still not working.
Any idea why?

Thanks a lot



same error here
Tomek Lipski, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

Junior Member Beiträge: 32 Beitrittsdatum: 17.11.10 Neueste Beiträge
Paolo Pilitti:
Alina Doca:
Hi,

I am trying to use the newsletter portlet you mentioned above, from Bluesoft. However, on the admin section I get an error:
Widgetset does not contain implementation for com.vaadin.ui.TextArea. Check its @ClientWidget mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions. Unrendered UIDL:
com.vaadin.ui.TextArea(NO CLIENT IMPLEMENTATION FOUND

I have replaced vaadin jar with the newer version 6.5.4, but this is still not working.
Any idea why?

Thanks a lot



same error here


Paolo, Alina

Please make sure that you have updated Vaadin widgetset to the required version. Henri Sara on Vaadin forums has posted great instruction sometime ago:

https://vaadin.com/forum/-/message_boards/view_message/231741

You just have to make sure to grab vaadin-6.5.4-liferay.zip as this is a version of VAADIN our sample uses. Anyways, the newsletter portlets should compile with newer versions of Vaadin without any consequences.
Tomek Lipski, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

Junior Member Beiträge: 32 Beitrittsdatum: 17.11.10 Neueste Beiträge
Wilson Silva:
Thanks for this portlet and for your help. I've translated the portlet messages to Portuguese (Portugal). The translation follows the Portuguese Language Orthographic Agreement of 1990 which was approved in 2008. I am following the portlet repository but if you plan to add new functionality to the portlet let me know and I will update the portuguese resources file.


This is great - do you mind if i merge your translation with sources in the github repository? https://github.com/tlipski/newsletter-for-liferay
thumbnail
Wilson Silva, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

New Member Beiträge: 19 Beitrittsdatum: 09.06.11 Neueste Beiträge
Not at all, go ahead emoticon
Eihab Khadora, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

New Member Beiträge: 2 Beitrittsdatum: 01.12.11 Neueste Beiträge
Hi Tomek,

I've tried to install the portlet into the liferay6.0.5 with mysql DB after installing no errors occurred, but the console was repeating the following sql statement for ever:

Hibernate:
select
this_.id as id2_0_,
this_.creationTime as creation2_2_0_,
this_.messageBody as messageB3_2_0_,
this_.messageSender as messageS4_2_0_,
this_.messageTitle as messageT5_2_0_,
this_.state as state2_0_
from
NewsletterJob this_
where
this_.state=?

and if I add the portlet, The liferay shows that it's unavailable.

I don't know what to do with this strange case.

thanks and Regards,
Eihab
Eihab Khadora, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

New Member Beiträge: 2 Beitrittsdatum: 01.12.11 Neueste Beiträge
Thanks It's ok with 6.0.6
Tomek Lipski, geändert vor 12 Jahren.

RE: Example of Liferay and Vaadin integration - newsletter portlet

Junior Member Beiträge: 32 Beitrittsdatum: 17.11.10 Neueste Beiträge
Eihab Khadora:
Thanks It's ok with 6.0.6


As this is only a showcase (although it seems that some people have found use for it), it was developed and tested on 6.0.6 only. Do you mind attaching server log files from 6.0.5? Portlet unavailable message should leave an exception stack trace in the server logs. In theory, this newsletter portlet should work regardless of Liferay 6.0.x minor version.

As for the Hibernate query - it is a seperate Thread job that sends out newsletter emails (you may use JMS or at least Quartz in production environment), so that the user sending newsletter does not have to wait for thousands of emails to be sent. The implementation is located in NewsletterSenderServlet.java.