java - How to reload resource bundle in web application? -
i have resource bundle java class read values database. when update db need reload bundle, don't know how. helps ?
package model.helpers; public class messages_en extends listresourcebundle { protected object[][] getcontents() { // db // ... } }
in view use bundle below:
<f:loadbundle basename="model.helpers.messages" var="m" />
resourcebundle.clearcache();
or
messages_en .clearcache();
calling method reload resources, refresh bundle
Comments
Post a Comment