[webbeans-commits] Webbeans SVN: r401 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/el.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Thu Dec 4 08:50:25 EST 2008


Author: pete.muir at jboss.org
Date: 2008-12-04 08:50:24 -0500 (Thu, 04 Dec 2008)
New Revision: 401

Modified:
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/el/WebBeansELResolver.java
Log:
Simple ELResolver impl

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/el/WebBeansELResolver.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/el/WebBeansELResolver.java	2008-12-04 13:22:32 UTC (rev 400)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/el/WebBeansELResolver.java	2008-12-04 13:50:24 UTC (rev 401)
@@ -23,6 +23,8 @@
 import javax.el.ELContext;
 import javax.el.ELResolver;
 
+import org.jboss.webbeans.ManagerImpl;
+
 public class WebBeansELResolver extends ELResolver
 {
 
@@ -32,7 +34,6 @@
    @Override
    public Class<?> getCommonPropertyType(ELContext context, Object base)
    {
-      // TODO Auto-generated method stub
       return null;
    }
 
@@ -42,7 +43,6 @@
    @Override
    public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base)
    {
-      // TODO Auto-generated method stub
       return null;
    }
 
@@ -52,7 +52,6 @@
    @Override
    public Class<?> getType(ELContext context, Object base, Object property)
    {
-      // TODO Auto-generated method stub
       return null;
    }
 
@@ -62,8 +61,14 @@
    @Override
    public Object getValue(ELContext context, Object base, Object property)
    {
-      // TODO Auto-generated method stub
-      return null;
+      if (base == null && property != null)
+      {
+         return ManagerImpl.instance().getInstanceByName(property.toString());
+      }
+      else
+      {
+         return null;
+      }
    }
 
    /**
@@ -72,7 +77,6 @@
    @Override
    public boolean isReadOnly(ELContext context, Object base, Object property)
    {
-      // TODO Auto-generated method stub
       return false;
    }
 
@@ -82,7 +86,6 @@
    @Override
    public void setValue(ELContext context, Object base, Object property, Object value)
    {
-      // TODO Auto-generated method stub
    }
 
 }




More information about the weld-commits mailing list