I have a requirement in my project where a screen data is to be
rendered from a cloned or object copy rather than on actual object.
This way, if user wish to cancel the changes, the original object will
not be affected and if user accepts the changes, the modified cloned
object replaces the original object.
Is there any proven technique to clone an object in GWT? I was
thinking of using serialization classes, like SerializerBase,
SerializationStreamReader, SerializationStreamWriter in GWT API but
their implementation is not clear to me. Moreover, our project does
not support 3rd party APIs and hence I cannot use the supporting Jars
for this objective.
Any help in this context would be appreciated.
Thanks,
Anky
An AutoBean and the property values stored within it can be cloned. The clone() method has a boolean parameter that will trigger a deep or a shallow copy. Any tag values associated with the AutoBean will not be cloned. AutoBeans that wrap a delegate object cannot be cloned.