beanList.add(managedBean.getManagedBeanName());
// populate the bean with its contents
try {
ApplicationAssociate associate = getAssociate(context);
InjectionProvider injectionProvider =
associate.getInjectionProvider();
// Perform resource injection first
if (injectable) {
injectionProvider.inject(bean);
}
// now setup the managed properties which may
// leverage the injected info from the previous step
switch (beanType = getBeanType(bean)) {
case TYPE_IS_LIST:
copyListEntriesFromConfigToList(
managedBean.getListEntries(),
(List) bean);
break;
case TYPE_IS_MAP:
copyMapEntriesFromConfigToMap(managedBean.getMapEntries(),
(Map) bean);
break;
case TYPE_IS_UICOMPONENT:
// intentional fall-through
case TYPE_IS_BEAN:
setPropertiesIntoBean(bean, beanType, managedBean);
break;
default:
// notreached
assert (false);
break;
}
// now invoke methods marked with @PostConstruct
if (injectable) {
injectionProvider.invokePostConstruct(bean);
}
} catch (FacesException fe) {
throw fe;
} catch (ClassNotFoundException cnfe) {