Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
Dave Weitzel
Portal wide preferences in 6.1
17 de Fevereiro de 2012 07:01
Resposta

Dave Weitzel

Ranking: Regular Member

Mensagens: 203

Data de entrada: 18 de Novembro de 2009

Mensagens 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?