PDA

View Full Version : BaseModelData/BeanModel GXT1.1.1 Serialization Issue



jraue
20 Oct 2008, 5:22 AM
Hi folks,

when I am using GXT1.1.1 with GWT1.5.1/2/3, I receive this warning when passing over objects between client and server:

[WARN] In order to produce smaller client-side code, 'Object' is not allowed; consider using a more specific type

In many instances I pass over list results as PagingLoadResult<BaseModelData>. The warning is coming from analyzing BaseModelData and then descending into BeanModel:

[DEBUG] Analyzing the fields of type 'com.extjs.gxt.ui.client.data.BeanModel' that qualify for serialization

What am I doing wrong? Am I not suppose to let my objects to transfer derive from BaseModelData? Or, is this maybe a GXT issue that needs to be fixed in BeanModel?

Any help appreciated,

Joachim

jraue
20 Oct 2008, 5:30 AM
PS: GWT complains that BeanModel contains a
protected Object bean;

jraue
20 Nov 2008, 2:45 AM
Am I really the only one getting these warnings? How do you others avoid that issue?

sbroffian
26 Jan 2009, 2:23 AM
Hi I'm getting this message too. Did you find the reason for that?

Thanks,
Fabian

jraue
26 Jan 2009, 2:39 AM
I traced the warnings back to some functions returning values of BasePagingLoadResult<BaseModelData>.

In the end, I defined a new class that extends BasePagingLoadResult<BaseModelData> and implements Serializable and passed over this one, which solved the issue.

HTH,
Joachim

sbroffian
30 Jan 2009, 1:34 AM
Hi Joachim and thanks for the reply.

Following this thread http://extjs.com/forum/showthread.php?t=51797 and this blog post http://extjs.com/blog/2008/07/14/preview-java-bean-support-with-ext-gwt (http://extjs.com/forum/../blog/2008/07/14/preview-java-bean-support-with-ext-gwt)I've found out what my problem is. I've a project build with a version of Ext GWT prior to 1.1. The objects that are transered between the client and the server are instances of ModelData, but as of version 1.1 I can use my bean directly (implementing an interface or creating a new interface as described in the blog post). What I have to do is refctor my code to use the new system.

Thank you anyway,
Fabian