blog.jesinger.net Liferay and more

7Nov/102

Custom Portlet Modes in Liferay 5.2.3

This post will show you how you can integrate the feature of using Custom Portlet Modes in your Liferay 5.2.3 - Portal. I realized this as part of my Bachelor Thesis at University of Applied Sciences Weingarten.

Custom Portlet Modes are not supported by Liferay Portal because this part is optional in the Portlet Standard (JSR-168 and JSR-286). So the Liferay guys just did not implement it.
It took me quite some time to get it done but finally it worked!! My Liferay portal now supports custom portlet modes.

After you modified your Liferay, your portlets will be able to use custom portlet modes according to the portlet standard! This is a pretty cool feature which a lot people are missing.

What you will need:

What you have to do:

1.) download the modified files and copy them into your EXT-Project at the correct positions

2.) modify your ext-spring.xml and add the following lines:
[code lang="xml"]

[/code]

3.) modify your portal-ext.properties and add the following line:

[code lang="ini"]
servlet.service.events.pre=com.liferay.portal.events.HRWServicePreAction
[/code]

With these modifications you will be able to run portlets that are using custom portlet modes.

To test your new functions and to give you an idea of how to use these modes, here is a Test portlet which uses a custom portlet mode. You can download the war file or the sources with the included Eclipse project. Your choice!

If something does not work properly, please let me know. Comments are highly appreciated! 🙂
Maybe this works with Liferay 6 too, but i have not tested it yet. Maybe someone could do this and let me know if it works too!

Have fun!

22Jul/100

Hey Folkz!

Hey Folkz!

This ist my first post on my new blog!

In a few days or weeks I will post here how you can integrate custom portlet modes into your Liferay Portal!
I got it working! 🙂 I did this with Liferay 5.2.3 but I will have a look at the latest Liferay 6.x version if it works there too.

cheers