CVS: Tapestry/framework/src/net/sf/tapestry/event ObservedChangeEvent.java,1.4,1.4.2.1

Howard Lewis Ship <[email protected]>
Newsgroups gmane.comp.java.tapestry.cvs
Message-ID <[email protected]>
Update of /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/event
In directory sc8-pr-cvs1:/tmp/cvs-serv9416/framework/src/net/sf/tapestry/event

Modified Files:
      Tag: hship-2-3
	ObservedChangeEvent.java 
Log Message:
Relax the requirement that persistent page properties be Serializable (since, for EJBObject, that may not be the case).

Index: ObservedChangeEvent.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/event/ObservedChangeEvent.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** ObservedChangeEvent.java	27 Nov 2002 17:58:52 -0000	1.4
--- ObservedChangeEvent.java	31 Dec 2002 12:21:45 -0000	1.4.2.1
***************
*** 17,23 ****
  public class ObservedChangeEvent extends EventObject
  {
!     private IComponent component;
!     private String propertyName;
!     private Serializable newValue;
  
      public ObservedChangeEvent(IComponent component, String propertyName, char newValue)
--- 17,23 ----
  public class ObservedChangeEvent extends EventObject
  {
!     private IComponent _component;
!     private String _propertyName;
!     private Object _newValue;
  
      public ObservedChangeEvent(IComponent component, String propertyName, char newValue)
***************
*** 79,88 ****
                  Tapestry.getString("ObservedChangeEvent.null-property-name", component));
  
!         if (newValue != null && !(newValue instanceof Serializable))
!             throw new IllegalArgumentException(Tapestry.getString("ObservedChangeEvent.must-be-serializable"));
! 
!         this.component = component;
!         this.propertyName = propertyName;
!         this.newValue = (Serializable) newValue;
      }
  
--- 79,85 ----
                  Tapestry.getString("ObservedChangeEvent.null-property-name", component));
  
!         _component = component;
!         _propertyName = propertyName;
!         _newValue = newValue;
      }
  
***************
*** 92,123 ****
      }
  
-     /**
-      *  Constructor for an unknown change event.  The receiver must acknowledge
-      *  that the observed object changed.  This is used when a property of
-      *  the component is itself is a data holder (such as a Collection object) and
-      *  it changes.
-      *
-      **/
- 
-     public ObservedChangeEvent(IComponent component)
-     {
-         super(component);
- 
-         this.component = component;
-     }
- 
      public IComponent getComponent()
      {
!         return component;
      }
  
!     public Serializable getNewValue()
      {
!         return newValue;
      }
  
      public String getPropertyName()
      {
!         return propertyName;
      }
  
--- 89,105 ----
      }
  
      public IComponent getComponent()
      {
!         return _component;
      }
  
!     public Object getNewValue()
      {
!         return _newValue;
      }
  
      public String getPropertyName()
      {
!         return _propertyName;
      }
  



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.