Author: knopp
Date: Fri Sep 12 02:07:16 2008
New Revision: 694658
URL: http://svn.apache.org/viewvc?rev=694658&view=rev
Log:
detach model object
Modified:
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/model/Model.java
Modified:
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/model/Model.java
URL:
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/model/Model.java?rev=694658&r1=694657&r2=694658&view=diff
==============================================================================
---
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/model/Model.java
(original)
+++
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/model/Model.java
Fri Sep 12 02:07:16 2008
@@ -31,7 +31,7 @@
* simple model object. The model object must be serializable, as it is stored
in the session. If
* you have large objects to store, consider using
* [EMAIL PROTECTED] org.apache.wicket.model.LoadableDetachableModel} instead
of this class.
- *
+ *
* @author Chris Turner
* @author Eelco Hillenius
*/
@@ -51,7 +51,7 @@
/**
* Construct the model, setting the given object as the wrapped object.
- *
+ *
* @param object
* The model object proper
*/
@@ -91,7 +91,7 @@
/**
* Set the model object; calls setObject(java.io.Serializable). The
model object must be
* serializable, as it is stored in the session
- *
+ *
* @param object
* the model object
* @see org.apache.wicket.model.IModel#setObject(Object)
@@ -110,7 +110,7 @@
/**
* Sets the model object. The model object must be serializable, as it
is stored in the session
- *
+ *
* @param object
* The serializable model object
* @see org.apache.wicket.model.IModel#setObject(Object)
@@ -125,6 +125,10 @@
*/
public void detach()
{
+ if (object instanceof IDetachable)
+ {
+ ((IDetachable)object).detach();
+ }
}
/**