View Full Version : Serialization of ContentPanel
I am creatin object of
public class Content extends ContentPanel implements Serializable {
Content(){
}
//some other stuff
}
but GWT compilers give me message:
Type 'pl.testPackage.client.UIManagment.Content' was not serializable and has no concrete serializable subtypes
Is imposible to create part of gui on server and then with RPC send to client when I need this part?
"in some other stuff" I use a class which didn't implement a serialization. I erase all body of class, and create empty definition with empty, non parameter constructor. Now I have Http error 500.
Colin Alworth
25 Aug 2009, 3:47 AM
'pl.testPackage.client.UIManagment.Content' looks like it is your own code - if any serializable object has non-(transient|final|static) fields, they too must be serializable.
Is imposible to create part of gui on server and then with RPC send to client when I need this part?Technically there is nothing wrong with this, but these objects are not generally designed to do this, as there are event handlers, parent nodes, dom elements that probably cannot be cleanly serialized (see my first point). A better idea would be to build model objects that accuratly describe what you are trying to save, and have methods to turn them into layout, and layout into models on your save and restore calls.
Thanks for reply, I test some other trick and I also think that ContentPanel have some element that it can't be serialized. As you say only good solution is creating GUI dynamic in client and get from server parameters that we need.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.