[seam-commits] Seam SVN: r7578 - trunk/src/main/org/jboss/seam/jsf.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Fri Mar 14 08:07:25 EDT 2008
Author: pete.muir at jboss.org
Date: 2008-03-14 08:07:24 -0400 (Fri, 14 Mar 2008)
New Revision: 7578
Modified:
trunk/src/main/org/jboss/seam/jsf/MapDataModel.java
Log:
JBSEAM-1659
Modified: trunk/src/main/org/jboss/seam/jsf/MapDataModel.java
===================================================================
--- trunk/src/main/org/jboss/seam/jsf/MapDataModel.java 2008-03-14 11:47:09 UTC (rev 7577)
+++ trunk/src/main/org/jboss/seam/jsf/MapDataModel.java 2008-03-14 12:07:24 UTC (rev 7578)
@@ -28,8 +28,10 @@
private static final long serialVersionUID = -4888962547222002402L;
private int rowIndex = -1;
- private List<Map.Entry> entries;
+ private Map data;
+ private transient List<Map.Entry> entries;
+
public MapDataModel() {}
public MapDataModel(Map map)
@@ -131,6 +133,7 @@
@Override
public void setWrappedData(Object data)
{
+ this.data = (Map) data;
entries = data == null ? null : new ArrayList( ( (Map) data ).entrySet() );
int rowIndex = data != null ? 0 : -1;
setRowIndex(rowIndex);
@@ -139,14 +142,15 @@
private void writeObject(ObjectOutputStream oos) throws IOException
{
oos.writeInt(rowIndex);
- oos.writeObject(entries);
+ oos.writeObject(data);
}
private void readObject(ObjectInputStream ois) throws IOException,
ClassNotFoundException
{
rowIndex = ois.readInt();
- entries = (List<Map.Entry>) ois.readObject();
+ data = (Map) ois.readObject();
+ entries = data == null ? null : new ArrayList( ( (Map) data ).entrySet() );
}
}
More information about the seam-commits
mailing list