You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Joe Germuska <Jo...@Germuska.com> on 2002/10/15 21:08:33 UTC
[resources] ResourcesDynaBean?
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
--
--
* Joe Germuska { joe@germuska.com }
"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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>