Search code examples
javaliferayresourcebundleliferay-6

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[get latest value from property file] without deploying portlet?

Thanks in Advance, Mayur Patel


Solution

  • 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.