commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <>
Subject [resources] ResourcesDynaBean?
Date Tue, 15 Oct 2002 19:08:33 GMT
I have a situation where I'd like to use a MessageResources object as 
a bean.  I was thinking about implementing a ResourcesDynaBean that 
would wrap a Resources object, but then after thinking about it and 
looking at the Resources code, I realize the complexity of knowing 
the available message keys ahead of time.  Without those, I don't see 
how you could make a DynaClass, but given the fall-back nature of 
internationalized resources files, it's uncertain how you would get 
all the key names.

It strikes me that if you required a locale for the 
ResourcesDynaBean, as well as a Resources, then you could reasonably 
load all of the resource files in the chain, from most specific to 
least, and get all the key names.  I suppose the overhead to doing 
all of this at DynaBean creation time might be significant.

Does this even seem useful to anyone else?


* Joe Germuska    { }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble.... As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
	--Sam Goody, 1956

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message