Hello,
I am building a h:selectOneMenu and I had a need to localize the text in the select menu. My problem is I don't know how to get the text from a resource file using EL?
For example, say 'res' is my resource-bundle mapped in faces-config.xml, I know we can do this:
facesMessages.add("#{res['enum.typeA.label']}");
String label = "#{res['enum.typeA.label']}";
But you can do this:
... @In private Map<String, String> res; .... String label = res.get("enum.typeA.label");
... @In("#{res['enum.typeA.label']}") private String label; ....