掲示板

instanceable portlet saving preference setting?

16年前 に c c c によって更新されました。

instanceable portlet saving preference setting?

Junior Member 投稿: 42 参加年月日: 07/11/08 最新の投稿
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
16年前 に Reinier de Graaf によって更新されました。

RE: instanceable portlet saving preference setting?

New Member 投稿: 15 参加年月日: 07/10/25 最新の投稿
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
16年前 に c c c によって更新されました。

RE: instanceable portlet saving preference setting?

Junior Member 投稿: 42 参加年月日: 07/11/08 最新の投稿
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
16年前 に Dmitry Y. Kochelaev によって更新されました。

RE: instanceable portlet saving preference setting?

Junior Member 投稿: 45 参加年月日: 07/05/14 最新の投稿

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
13年前 に Raja Nagendra Kumar によって更新されました。

RE: instanceable portlet saving preference setting?

Expert 投稿: 484 参加年月日: 06/03/02 最新の投稿
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