title: How to get a JSF resource bundle property value in backing bean?
body: <p>I am using JSF 2. I am trying to resolve a message bundle reference dynamically the a managed bean property. The value contains the bundle name as well as the key. This is required as the value may come from one of a few different bundles. I have tried many permutations, but the value from the bean seems to be always resolved as a literal String (outputting with EL brackets) and the bundle is never called to resolve and return the value. Any ideas?</p>
  
  <p>I have tried:</p>
  
  <pre class="lang-none prettyprint-override"><code>#{bundle['key']}
  ${bundle['key']}
  bundle['key']
  </code></pre>
  
  <p>They are outputted exactly as-is, also in a <code>&lt;h:outputText&gt;</code>. It works fine if I write it directly in the page. My theory is that JSF doesnt realise it has to process the String as an expression. Is there some way to force it?</p>