Changing the text / content using properties files at runtime
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
精彩评论