Liferay 6.1 Configuration Mode

Leave a Comment
Liferay 6.1 has lots of new features . Currently i am working with Liferay 6.1 and come to know about some of the cool features of it. So here i am sharing things i know.

 1) First thing i want to share about Liferay 6.1 is its Configuration Mode . We can easily create Configuration mode just by creating one JSP and few entries in XML .

 What we need to do is we just need to follow some standard to do it with minimal effort.
 Earlier in LR 5.2.X to create configuration we need to do so many stuff.
 -make entry in liferay-portlet.xml
 -create ConfigurationActionImpl class -
-write logic to save configuration data in preferences
-create configuration JSP .

 Now if we do the same thing LR 6.1 then it wont take much time Just follow below steps . Make below entry in your liferay-portlet.xml

This is the class created by Liferay which will do all the stuff for us . (to store data in preference , to display configuration JSP) Now to render your configuration page when user click on configuration make below entry in portlet.xml

you can also specify config-template instead of config-jsp that will also work.
To store you configuration data automatically into preferences we just need to follow some standard.
Let say if you have one text box in configuration JSP and you want to store its data into preferences.
Make sure you create your text field with the following way.

And if you want to retrive value from preferences then you can get it by doing.

Next PostNewer Post Previous PostOlder Post Home


Post a Comment