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

Peter Muir peter at bleepbleep.org.uk
Tue Aug 28 06:50:08 EDT 2007


  User: pmuir   
  Date: 07/08/28 06:50:08

  Modified:    src/main/org/jboss/seam  Component.java
  Log:
  JBSEAM-1868
  
  Revision  Changes    Path
  1.282     +11 -8     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.281
  retrieving revision 1.282
  diff -u -b -r1.281 -r1.282
  --- Component.java	13 Aug 2007 14:20:34 -0000	1.281
  +++ Component.java	28 Aug 2007 10:50:08 -0000	1.282
  @@ -1488,7 +1488,10 @@
         Object dataModel = getOutScope(scope, this).getContext().get(name);
         if ( dataModel!=null )
         {
  +         if ( PAGE.equals(scope) )
  +         {
            dataModelGetter.set(bean, wrapper.getWrappedData(dataModelAnn, dataModel));
  +         }
         
            Object selectedIndex = wrapper.getSelection(dataModelAnn, dataModel);
         
  @@ -2544,17 +2547,13 @@
         public BijectedProperty(String name, Method getter, T annotation)
         {
            this.getter = new BijectedMethod(name, getter, annotation);
  -         Method setterMethod;
            try
            {
  -            setterMethod = Reflections.getSetterMethod(getter.getDeclaringClass(), name);
  -         }
  -         catch (IllegalArgumentException e)
  -         {
  -            throw new IllegalArgumentException("Component must have a getter/setter pair for property " + name + " annotated with @" + annotation.annotationType().getSimpleName(), e);
  -         }
  +            Method setterMethod = Reflections.getSetterMethod(getter.getDeclaringClass(), name);
            this.setter = new BijectedMethod(name, setterMethod, annotation);
         }
  +         catch (IllegalArgumentException e) {}        
  +      }
   
         public Object get(Object bean)
         {
  @@ -2578,6 +2577,10 @@
   
         public void set(Object bean, Object value)
         {
  +         if (setter == null)
  +         {
  +            throw new IllegalArgumentException("Component must have a setter for " + name);
  +         }
            setter.set(bean, value); 
         }
         
  
  
  



More information about the jboss-cvs-commits mailing list