开发者

Changing the text / content using properties files at runtime

开发者 https://www.devze.com 2023-04-08 14:38 出处:网络
I\'m using ResourceBundle.getBundle() to load property file in our portlet But If any user wants to change contents of that property file at runtime without deploying that portlet again.

I'm using ResourceBundle.getBundle() to load property file in our portlet But If any user wants to change contents of that property file at runtime without deploying that portlet again.

How can it reflect in UI[ge开发者_StackOverflow社区t latest value from property file] without deploying portlet?

Thanks in Advance, Mayur Patel


There's no such functionality in Liferay.

You'd have to change Liferay code to make this work the way you want.

To understand where in Liferay code .properties files are loaded into ResourceBundle-s see com.liferay.portlet.PortletConfigImpl class getResourceBundle(Locale locale)� method and com.liferay.portal.language.LanguageResources _loadLocale(Locale locale)� method.


If I understand the question correct you can use portletPreferences instead of that propertyfile...

See if you can find the table portletpreferences in your liferay database and see if that is anything for you.

/Björn

0

精彩评论

暂无评论...
验证码 换一张
取 消