[jboss-user] [JBoss Seam] - Re: How to get ResourceBundle message from backend using Sea

xigua do-not-reply at jboss.com
Fri Mar 23 18:24:06 EDT 2007


"petemuir" wrote : You are probably after the Messages component (which you access in JSF as #{messages[key]}).
  | 
  | You could do Messages.instance().get(key) or @In(#{messages[key]} String value or @In Map<String, Object> messages;

For the front end, I specify the view-id in pages.xml such as
<page view-id="/scheduler/editFlightInfo.xhtml" bundle="scheduler/editFlightInfo"/>
Then I have a editFlightInfo_en.properties under WEB-INF/classes/scheduler

then on editFlightInfo.xhtml, I can do things like "#{messages.keyname}" where the keyName is in editFlightInfo_en.properties.

However, how Seam know which view-id I am referring to (or which resource bundle file) from the java side?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031234#4031234

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031234



More information about the jboss-user mailing list