}
// iterate over the list of managed beans
for (Iterator i = mbMap.entrySet().iterator(); i.hasNext(); ) {
Map.Entry entry = (Map.Entry) i.next();
String managedBeanName = (String) entry.getKey();
ManagedBeanFactoryImpl managedBeanFactory = (ManagedBeanFactoryImpl)
entry.getValue();
ManagedBeanBean managedBean = managedBeanFactory.getManagedBeanBean();
if ( managedBean != null) {
Locale curLocale = Util.getLocaleFromContextOrSystem(facesContext);
String locale = curLocale.toString();
DescriptionBean descBean = managedBean.getDescription(locale);
String desc = "";
descBean = (null != descBean) ? descBean :
managedBean.getDescription("");
if (null != descBean) {
// handle the case where the lang or xml:lang attributes
// are not specified on the description
desc = descBean.getDescription();
}
list.add(Util.getFeatureDescriptor(managedBeanName,
managedBeanName, desc, false, false, true,
managedBeanFactory.getManagedBeanClass(), Boolean.TRUE));
}
}
return list.iterator();
}