Jeremy,

Close...here is what I'm doing in order to support
ResourceBundle.Control.

1. Configure the TextProvider in struts.xml (constant
struts.xworkTextProvider)
2. Our TextProvider impl extends TextProviderSupport and overrides
getTexts(String name)
   - we call ResourceBundle.getBundle with a RB.C object
3. Configure the list of default resource bundles (constant
struts.custom.i18n.resources)
4. An <s:text> within an <s:i18n> works fine since <s:i18n> calls
getTexts
5. An <s:text> outside an <s:i18n> or getText method invocation does not
work
   - the Class-based TP from the Action goes through all its RBs and
doesn't find them (and that calls our TP)
   - it then tries to use the RBs defined as the defaults - this does
not call our TP

We've applied patches for TextProviders not being singletons and a patch
to I18N
to call getTexts and a few other patches but this one looks like it is
just a bad 
design (treating struts2 and xwork messages as part of the standard
customization
mechanism - they are bootstrap - not configuration).

Does that help?  I've logged the bug but can't go to 2.1 branch as it is
beta
and my company won't allow that.

Brian

-----Original Message-----
From: Jeromy Evans [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 27, 2008 23:33
To: Struts Users Mailing List
Subject: Re: Default bundles with JDK6

Repko, Brian wrote:
> There's been no reply to this - is there something more that
> I can give folks for help on this? 
>
>   

Sounds like a bug. This section has always seemed messy to me.  There's 
been several changes here in the 2.1 branch.

I don't completely understand your approach, but presume you have a 
common base class for your actions that delegates to your TextProvider 
implementation instead of the default.  If not, you should 
(replace/extend ActionSupport and delegate to your TextProvider mixin).

As the action is (usually) at the top of the stack, the first 
TextProvider found will be your implementation of the various getText 
methods and you can do whatever you like before delegating to XWork.  Or

have I misunderstood the need?



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


This e-mail message is being sent solely for use by the intended recipient(s) 
and may contain confidential information.  Any unauthorized review, use, 
disclosure or distribution is prohibited.  If you are not the intended 
recipient, please contact the sender by phone or reply by e-mail, delete the 
original message and destroy all copies. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to