I agree the StringResourceLoaders should not be cleared, or at least not
automatically cleared behind the scenes. I don't see why anyone would not
want the ComponentStringResourceLoader just because they added some
application specific resource loaders.

On Tue, Aug 19, 2008 at 11:20 PM, lesterburlap <[EMAIL PROTECTED]> wrote:

>
> Hi!
>
> I've been having a blast sorting out my String resources the last couple of
> days.  Thanks for everyone's help.  I am using Wicket in an OSGI
> environment
> with modular "Blades" (these are not Wicket Components).  In addition to
> the
> root MyApplication.properties, I need to have a independent and separate
> ApplicationBlade.properties for each of these modules.  In
> Application.init,
> this is working great for me:
>
> for (Class c : myBladeClassList)
> {
>   getResourceSettings().addStringResourceLoader(new
> ClassStringResourceLoader(c));
> }
>
> // but then I have to do this to set MyWebApplication.properties
> // and the default ComponentStringResourceLoader
> getResourceSettings()
>   .addStringResourceLoader(
>      new ClassStringResourceLoader(MyWebApplication.class));
> getResourceSettings()
>   .addStringResourceLoader(
>      new ComponentStringResourceLoader());
>
> Again, this works fine, but seems so wrong and dangerous.
>
> Why does the Wicket Settings class clear the stringResourceLoaders list and
> set overriddenStringResourceLoaders to true when you add an
> IStringResourceLoader?  This occurs at line 387 of Settings in Wicket
> 1.3.4.
>
> Would it be reasonable to have an enhancement wherein there's an optional
> argument indicating NOT to clear the stringResourceLoaders list?  Maybe I
> don't understand the bigger picture of setting your own
> StringResourceLoaders.
>
> Thanks for any input.
>
> Lester Burlap
> --
> View this message in context:
> http://www.nabble.com/Adding-ClassStringResourceLoader%28s%29-tp19058925p19058925.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to