}
protected String getResource(String key) {
Application application = getApplication();
Locale loc = application.getDefaultLocale();
UserBean uBean = (UserBean) getBean("userBean");
if (uBean != null && uBean.getLocale() != null) {
loc = new Locale(uBean.getLocale());
application.setDefaultLocale(loc);
}
return getResource(application.getMessageBundle(), key, loc);
}