The portlet preferences are intended to store basic configuration data for portlets. The PortletPreferences interface allows the portlet to store configuration data, not to replace the general-purpose databases.
Normally, there are two different types of preferences: Modifiable and Read Only.
Modifiable preferences can be changed by the portlet in any standard portlet mode (for example, EDIT, HELP, and VIEW). While Read-Only preferences cannot be changed by the portlet in any standard portlet mode, they may be changed by administrative modes.
By default, preference is modifiable.
Following are the steps to add portlet preferences (configurations) to custom portlet:
1. Add a configuration.jsp file:
2. Create an ConfigurationActionImpl class :
3. Made an entry in liferay-portlet.xml file:
<configuration-action-class>ConfigurationActionImpl</configuration-action-class>
4. Just Fetch and use the preferences:
5.Adding Preferences Default Value to Portlet.xml:
In this way you can add any configuration options to the portlet and persist them portlet preferences.
If you have any questions or query, Please comment.....
Normally, there are two different types of preferences: Modifiable and Read Only.
Modifiable preferences can be changed by the portlet in any standard portlet mode (for example, EDIT, HELP, and VIEW). While Read-Only preferences cannot be changed by the portlet in any standard portlet mode, they may be changed by administrative modes.
By default, preference is modifiable.
Following are the steps to add portlet preferences (configurations) to custom portlet:
1. Add a configuration.jsp file:
2. Create an ConfigurationActionImpl class :
3. Made an entry in liferay-portlet.xml file:
<configuration-action-class>ConfigurationActionImpl</configuration-action-class>
4. Just Fetch and use the preferences:
5.Adding Preferences Default Value to Portlet.xml:
In this way you can add any configuration options to the portlet and persist them portlet preferences.
If you have any questions or query, Please comment.....
Thanks for spending some time to describe the terminlogy for the beginners!
ReplyDeleteGood ideas! I have been searching for things similar to this for a while currently. With thanks!
ReplyDeleteHi, really love the style of your website. Would you mind telling me what theme you are applying? I’m new to this and I’m hoping to acquire mine searching anywhere near as cool as yours. Thanks a lot.
ReplyDeleteGood points
ReplyDeleteI like this info shown and it has given me some sort of commitment to succeed for some reason, so thanks.
ReplyDeleteThx for this great information that you are sharing with us!!!
ReplyDeleteThis is just what i was looking for! Thanks a million, God bless u :)
ReplyDelete