myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Marinschek" <martin.marinsc...@gmail.com>
Subject Re: Resource bundles
Date Tue, 07 Nov 2006 11:34:09 GMT
Hi Niklas,

I suppose you could pass an attribute into your facelets-component like this:

<myns:mycomp id="test"/>

and then use this id as a name for the msg:

<f:loadBundle var="#{id}"/>

not tested, not guaranteed to work ;)

regards,

Martin

On 11/6/06, Niklas Ekman <niklas.ekman@gmail.com> wrote:
> Hello,
>
> I'm using MyFaces 1.1.4 and Facelets 1.1.11. I've created a main web
> application project. I've also created a component library project where I
> want to place custom components.
>
> The problem I have is that I get a resource bundle clash. In a component I
> declare a resource bundle with <f:loadBundle basename=" component.messages"
> var="msg" />. It works very well in itself. But when I include the component
> on a page with the tag <f:loadBundle basename="app.messages" var="msg" /> I
> get a bundle clash. I read the specs and it says that the <f:loadBundle/>
> places the resource bundle in a bean with the request scope. I suspect that
> the component and the page share the same bean "space". So the problem I
> have is, how can I have unique resource bundles in my components?
>
> Best regards,
>
> Niklas
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Mime
View raw message