On Monday 08 March 2004 16:21, Jason Carreira wrote:
> Note that if you set this flag the same check will be done for all
> validation files and conversion property files, although not for text
> bundles (complain to Sun, it's their PropertyResourceBundle).
I needed to have some way of reloading ResourceBundles so I tried to use Spring
*deep breath* ReloadableResourceBundleMessageSource.
All I need to do was to override all getText(... methods in my BaseAction.
Something like this:
public String geText(String msg, String defaultValue, List args) {
return
WebApplicationContextUtils.getWebApplicationContext(ServletActionContext.getServletContext()).
getMessage(msg,args!=null?
args.toArray():null,defaultValue,getLocale());
}
and add in applicationContext.xml something like:
<bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames">
<list>
<value>WEB-INF/messages</value>
<value>WEB-INF/emails</value>
</list>
</property>
</bean>
The problem is that it will not try to check all of your action's parent classes.
Right now, this is not very necessary for me, but I guess it should be pretty
straightfoward to implement it.
Does anybody has a better or more complete solution for this?
Would this be usefull in the Wiki cookbook or something?
Fernando Martins
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork