@SuppressWarnings({"unchecked"})
public Object getValue(ELContext context, Object obj, Object property) throws NullPointerException, PropertyNotFoundException, ELException
{
//Bean instance
Object contextualInstance = null;
ELContextStore elContextStore = null;
if (obj == null)
{
//Name of the bean
String name = (String) property;
//Local store, create if not exist
elContextStore = ELContextStore.getInstance(true);
contextualInstance = elContextStore.findBeanByName(name);
if(contextualInstance != null)
{
context.setPropertyResolved(true);
return contextualInstance;
}
//Manager instance
BeanManagerImpl manager = elContextStore.getBeanManager();
//Get beans
Set<Bean<?>> beans = manager.getBeans(name);
//Found?