Commit 94748de2 authored by michael.simon's avatar michael.simon
Browse files

Get resourcebundle by base-name. Message bundle is not available any

more
parent 85e5b4b1
......@@ -24,17 +24,11 @@ public class ResourceBundleHelper {
public String resolveMessage(String key) {
FacesContext facesContext = FacesContext.getCurrentInstance();
if (facesContext == null || facesContext.getApplication() == null ||
facesContext.getApplication().getMessageBundle() == null)
return "???" + key + "???";
String messageBundleName = facesContext.getApplication().getMessageBundle();
if (facesContext.getViewRoot() == null || facesContext.getViewRoot().getLocale() == null)
if (facesContext == null || facesContext.getViewRoot() == null || facesContext.getViewRoot().getLocale() == null)
return "???" + key + "???";
Locale locale = facesContext.getViewRoot().getLocale();
ResourceBundle bundle = ResourceBundle.getBundle(messageBundleName, locale);
ResourceBundle bundle = ResourceBundle.getBundle("edu.kit.scc.webreg.res.DbMessageBundle", locale);
if (bundle == null)
return "???" + key + "???";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment