{
return VIEW;
}
//not found - check mangaged bean config
ManagedBean mbc = getRuntimeConfig(facesContext).getManagedBean(beanName);
if (mbc != null)
{
// managed-bean-scope could be a EL ValueExpression (since 2.0)
if (mbc.isManagedBeanScopeValueExpression())
{
// the scope is a custom scope
// Spec says, that the developer has to take care about the references
// to and from managed-beans in custom scopes.
// However, we do check the references, if we are not in Production stage
if (facesContext.isProjectStage(ProjectStage.Production))
{
return null;
}
else
{
String scopeExpression = mbc.getManagedBeanScopeValueExpression(facesContext).getExpressionString();
return getNarrowestScope(facesContext, scopeExpression);
}
}
else
{
return mbc.getManagedBeanScope();
}
}
return null;
}