[jboss-cvs] jboss-seam/src/main/org/jboss/seam ...

Gavin King gavin.king at jboss.com
Thu Aug 3 00:00:12 EDT 2006


  User: gavin   
  Date: 06/08/03 00:00:12

  Modified:    src/main/org/jboss/seam  Component.java
  Log:
  allow injection of methodbindings
  
  Revision  Changes    Path
  1.157     +12 -1     jboss-seam/src/main/org/jboss/seam/Component.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Component.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Component.java,v
  retrieving revision 1.156
  retrieving revision 1.157
  diff -u -b -r1.156 -r1.157
  --- Component.java	27 Jul 2006 19:07:08 -0000	1.156
  +++ Component.java	3 Aug 2006 04:00:12 -0000	1.157
  @@ -28,6 +28,7 @@
   import javax.faces.application.Application;
   import javax.faces.context.FacesContext;
   import javax.faces.convert.Converter;
  +import javax.faces.el.MethodBinding;
   import javax.faces.el.ValueBinding;
   import javax.interceptor.Interceptors;
   import javax.servlet.ServletRequest;
  @@ -87,7 +88,7 @@
    *
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
    * @author Gavin King
  - * @version $Revision: 1.156 $
  + * @version $Revision: 1.157 $
    */
   @Scope(ScopeType.APPLICATION)
   public class Component
  @@ -1657,6 +1658,10 @@
            {
               value = createValueBinding();
            }
  +         else if ( type.equals(MethodBinding.class) )
  +         {
  +            value = createMethodBinding();
  +         }
            else
            {
               value = createValueBinding().getValue( FacesContext.getCurrentInstance() );
  @@ -1682,6 +1687,12 @@
                  .createValueBinding( expression );
         }
         
  +      private MethodBinding createMethodBinding()
  +      {
  +         return FacesContext.getCurrentInstance().getApplication()
  +               .createMethodBinding( expression, null );
  +      }
  +      
         public String toString()
         {
            return "ELInitialValue(" + expression + ")";
  
  
  



More information about the jboss-cvs-commits mailing list