Craig McClanahan wrote:
Using the following tag:

    <f:loadBundle var="messages" basename="com.mycompany.mypackage.MyBundle
"/>

exposes the contents of the named resource bundle as a Map in request scope
under the specified key.  Now you can bind to it ... for example, to create
the localized label for the username field on a login screen, you might say:

    <h:outputText value="#{messages['usename.prompt']}"/>

where "username.prompt" is the message key.

Yeah, I get that bit; that's what led me down the route of trying to build the menu items in the JSP in the first place :-) The question is how, if I should be building them in the backing bean, do I get the localized label values there?

I guess I can lookup the message bundle in the request (using the equivealent of request.getAttribute("messages"), but then there's a fragile dependency between the page and the bean on the key specified in loadBundle.

L.


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

Reply via email to