Fórum

Portal wide preferences in 6.1

thumbnail
Dave Weitzel, modificado 12 Anos atrás.

Portal wide preferences in 6.1

Regular Member Postagens: 208 Data de Entrada: 18/11/09 Postagens Recentes
I have raised a Jira ticket for this issue but there may be a different approach in 6.1 as the source seems to explicitly have been changed. So I thought I would post here as well.
The requirement is to be able to store portletPreferences of "type" LIFERAY_PORTAL so that they apply everywhere and can be read using PrefsPropsUtil. We use them to store content ids for banner images in themes allowing admin t o change the banner without touching the theme, but the general need is everywhere IMHO to have dynamic portal wide properties.

The issue is when storing the preferences using preferences.store() In 6.1 a condition to check if they are LIFERAY_PORTAL is removed os the code does Validation that throws an exception.

I have written an EXT class that puts that condition back and the exception is no longer there BUT I am not seeing the preferences either using PrefPropsUtil.

Is there a new way of doing this in 6.1?