- BaseModel map equals() method doesn't work anymore
- GXT 1.1 alpha1 & 2
- Host mode & web mode
- Windows XP
Sample code :
Code:
import com.extjs.gxt.ui.client.data.BaseModel;
public class TestBug extends BaseModel {
public TestBug(String name, Double dbl) {
this.set("name", name);
this.set("value", dbl);
}
/**
* @param args
*/
public static void main(String[] args) {
TestBug m1 = new TestBug("alfredo shsfhsf",new Double(23));
TestBug m2 = new TestBug("alfredo shsfhsf",new Double(23));
System.out.println(m1.equals(m2));
}
@Override
public boolean equals(Object object) {
if (object==null) return false;
if (!(object instanceof TestBug)) return false;
TestBug ref = (TestBug) object;
return this.map.equals(ref.map);
}
}
With gxt 1.0 this code display : true but with 1.1 it displays false.
(I think but I'm not sure that a side effect of that is that some methods of the API doesn't work anymore, I have had some troubles selecting Model from Data widget and removing them. But I'm not yet sure it was because of this because I have noticed that with grids so I can't compare with gxt 1.0. )