The ComponentStringResourceLoader uses an Iterator named something
like (no code in front of me) "ResourceNameIterator".  This iterator
is used to find resources and markup.  You can't just set it on the
Application.getResourceSettings (though I should create a jira & patch
for that...), so you have to subclass the main string and markup
loaders to use your own iterator.  Then you put those loaders on
Application.getResouceSettings.

I'll fill in more details after I'm at work if that above is unclear.

- Scott


On Mon, Jun 30, 2008 at 3:49 AM, Lorenzo Bolzani <[EMAIL PROTECTED]> wrote:
> Hi,
> we have two pages sharing the same set of user messages so we would
> like to be able to share the same file.
> The two pages are different and cannot subclass a same parent.
> We cannot extract a common component because we have two different
> views on the same data.
>
> Maybe we could define an empty panel and share that only for the user
> massages but I do not like this idea.
>
> Is there a way to add/override a new resource file at the page level?
> So that key are looked up in this way:
>
> component
> form
> page
> custom page file    <----- this is new
> application
>
> and at the class level too. In other words I just want to insert e new file.
>
> We looked at IResourceLoader and this looks like an option
> (registering a custom Loader in the application init()). We tried and
> this works.
>
> The problem is how to integrate this new Loader with the standard
> ComponentStringResourceLoader so that the key is looked up also in the
> standard way.
>
> We had a look at PropertiesFactory trying to register a new file, but
> the list of resources is determined by a ResourceNameIterator in the
> method loadStringResources and is not easy to modify the behaviour of
> this method.
> So the only options seems to be to extend
> ComponentStringResourceLoader overriding loadStringResource(Class,
> String, Locale, String) with a big cut and paste.
>
> Is there any other option?
>
>
> Thanks, bye
>
>
> Lorenzo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to