if ( resourceBundleBean != null) {
Locale curLocale = Util.getLocaleFromContextOrSystem(facesContext);
String locale = curLocale.toString();
DescriptionBean descBean =
resourceBundleBean.getDescription(locale);
DisplayNameBean displayNameBean =
resourceBundleBean.getDisplayName(locale);
String desc = "",
displayName = "";
descBean = (null != descBean) ? descBean :
resourceBundleBean.getDescription("");
if (null != descBean) {
// handle the case where the lang or xml:lang attributes
// are not specified on the description
desc = descBean.getDescription();
}
displayNameBean = (null != displayNameBean) ? displayNameBean :
resourceBundleBean.getDisplayName("");
if (null != displayNameBean) {
displayName = displayNameBean.getDisplayName();
}
list.add(Util.getFeatureDescriptor(var,
displayName, desc, false, false, true,
ResourceBundle.class, Boolean.TRUE));
}