Vipin Bardia Il y a 9 années Both parts of this article are very nice.Thanks Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Peter Drábik Il y a 9 années Tried with Liferay 6.1.2, I got stuck on getting NullPointerException. After replacing "LIFERAY_SHARED_THEME_DISPLAY" with WebKeys.THEME_DISPLAY on line 76 in the Impl class, everthing works fine yet. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Peter Mesotten Peter Drábik Il y a 9 années Thanks for experimenting! Indeed, the web key for ThemeDisplay was changed between 6.1 and 6.2, so it is better to use the static variable. I don't know why I didn't do that in the first place. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Peter Mesotten Peter Drábik Il y a 9 années Thanks for experimenting! Indeed, the web key for ThemeDisplay was changed between 6.1 and 6.2, so it is better to use the static variable. I don't know why I didn't do that in the first place. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Peter Drábik Il y a 9 années Another fix It is possible that I am not doing everything well, but here's the problem: if I save the preferences, it is saved with id 86 and not with id of my portlet. Long story short - here is modified body of getPreferences:long companyId = portal.getCompanyId(portletRequest); String portletId = (String) portletRequest.getAttribute(WebKeys.PORTLET_ID); String portletResource = ParamUtil.getString(portletRequest, "portletResource"); if (Validator.isNotNull(portletResource)) { portletId = portletResource; } return portletPreferencesService.getPreferences(companyId, ownerId, ownerType, plid, portletId); Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Peter Mesotten Peter Drábik Il y a 9 années Hi Peter,The code was only tested for Liferay 6.2, so it may be possible that the behavior is different in 6.1. If I found some time I'll do some 6.1 testing as well and take your patch into consideration. Thanks again! Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Peter Mesotten Peter Drábik Il y a 9 années Hi Peter,The code was only tested for Liferay 6.2, so it may be possible that the behavior is different in 6.1. If I found some time I'll do some 6.1 testing as well and take your patch into consideration. Thanks again! Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Barmanand kumar Il y a 8 années Very useful Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Nagadeep cs Il y a 6 années This is a great blog. I would like to know if there are any performance considerations . If we use the preferences will there be any performance benefits or side effects? . I am looking for a user specific (or user scoped) preferences . Would it be better to have a servicebuilder create a table and have these user specific preferences managed or is it better to use the way this article explained? please let me know. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler