PDA

View Full Version : GWT cannot serialize collection of BaseModel objects having List<BaseModel> property



baluba
2 May 2008, 5:00 AM
In case this is design bug with Ext-GWT model objects I am posting an isolated description here.

Given the following two simple model objects


class ModelA extends BaseModel {
....
setMembers(List<ModelB> members) { ... }
}

class ModelB extends BaseModel {
...
}
A GWT service cannot return List<ModelA> , it fails during serialization by GWT claiming that that no serialization policy was defined for ModelB ???

If I make the model objects inherit from BaseTreeModel or Record the serilization works ok, but that's a poor solution.

I'm using GWT M2.


A somewhat more elaborate discussion on this is here:
http://extjs.com/forum/showthread.php?t=34276