Forums de discussion

instanceable portlet saving preference setting?

c c c, modifié il y a 16 années.

instanceable portlet saving preference setting?

Junior Member Publications: 42 Date d'inscription: 08/11/07 Publications récentes
I have managed to create Multiple instance of portlet. Is there any way by which I can store the preferences of the different instance of portlet? I had found an example at http://www.liferay.com/web/guest/community/forums/message_boards/message/92802?_19_redirect=%2Fweb%2Fguest%2Fcommunity%2Fforums%3Fp_p_id%3D19%26p_p_action%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-2%26p_p_col_count%3D1%26_19_struts_action%3D%252Fmessage_boards%252Fsearch%26_19_redirect%3D%252Fweb%252Fguest%252Fcommunity%252Fforums%26_19_breadcrumbsCategoryId%3D0%26_19_searchCategoryIds%3D0%26_19_keywords%3Dinstanceable%2Bportletid&

But I think Liferay has changed after that as I am using Liferay 4.3.3 and the class PortletPreferencesPK is deleted in this version as per http://support.liferay.com/browse/LEP-2725;jsessionid=4AE0D45EFCCB26904C6E521CBB607042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

So Can someone please provide me an example regarding how to store the preference for a portlet which is instanceable and to have seperate configuration for each portlet?

Thanks in advance

CSJakharia
thumbnail
Reinier de Graaf, modifié il y a 16 années.

RE: instanceable portlet saving preference setting?

New Member Publications: 15 Date d'inscription: 25/10/07 Publications récentes
This is a feature I am looking for as well.

To set preferences of instance able portlets in you theme, take a look at this thread:
http://www.liferay.com/web/guest/community/forums/message_boards/message/162700
c c c, modifié il y a 16 années.

RE: instanceable portlet saving preference setting?

Junior Member Publications: 42 Date d'inscription: 08/11/07 Publications récentes
Still I could not get the way to store the preference of portlet in 4.3.3.
Through that link Still I could not get the code/way to save the preference

Thanks in advance

CSJakharia
Dmitry Y. Kochelaev, modifié il y a 16 années.

RE: instanceable portlet saving preference setting?

Junior Member Publications: 45 Date d'inscription: 14/05/07 Publications récentes

PortletPreferences createdPreferences = PortletPreferencesFactoryUtil.getPortletSetup(myLayout, myPortletInstance.getPortletId());
createdPreferences.setValue("someProperty", "someValue");
createdPreferences.store();


Why don't you use something like code above? (I'm using this to set properties it works fine)
thumbnail
Raja Nagendra Kumar, modifié il y a 13 années.

RE: instanceable portlet saving preference setting?

Expert Publications: 484 Date d'inscription: 02/03/06 Publications récentes
Hi,

Can this be further applied based on i18n locale..

i.e preferences are per instance and per layout and per locale.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com