How to access message resources in custom component

Hi all,

I'm trying to build custom JSF navigation component. In my component class I call external EJB, and get navigation structure from it. Now menu can render menu almost correctly, but I have one problem: I have menu items labels as keys for internationalized messages. How can I print message under this key for current locale in my custom tag?

Thanks in advance

[387 byte] By [kfaziusa] at [2007-11-27 9:53:02]
# 1

If you are defining the tag using JSP fragments or by a facelet, use the standard loadBundle component.

If your tag is backed by actual code, you can get the locale of the client by the ExternalContext.getRequestLocale() method. Then load the bundle by ResourceBundle.getBundle(String,Locale).

RaymondDeCampoa at 2007-7-13 0:22:08 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...