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

2011-08-19 Thread Paul Robinson
Converting an app to use generics is a pain, but once you've done it, it does make a lot of sense. It cuts down on a lot of casting and helps keep things type-safe. It's also a reminder about exactly what is supposed to be in each collection. It's well worth taking the time to do the

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

2011-08-19 Thread David
but in my applicaiton: public Map java.lang.String,java.util.List filterStates = new HashMap(); the value of filterStates is java.util.List, I can't specify the type for it, for in my app, this value is Object, it might be String, and other self-defined class/object, how to handle this?

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

2011-08-19 Thread Paul Robinson
On 19/08/11 08:07, David wrote: but in my applicaiton: public Map java.lang.String,java.util.List filterStates = new HashMap(); the value of filterStates is java.util.List, I can't specify the type for it, for in my app, this value is Object, it might be String, and other self-defined

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

2011-08-19 Thread David
twu question: 1. what difference? public interface State {} and public class State implements Serializable { MyType type; String string; FOO foo; BAR bar; } 2. what difference between Serializable and IsSerializable? -- You received this message

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

2011-08-19 Thread Paul Robinson
On 19/08/11 09:14, David wrote: twu question: 1. what difference? public interface State {} and public class State implements Serializable { MyType type; String string; FOO foo; BAR bar; } It's just a matter of taste, of which one you prefer.

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

2011-08-18 Thread David
When I upgrade GWT version from 1.4.60 to 1.5.3 in my project, I run at hosted mode, I found many errors like below: [WARN] In order to produce smaller client-side code, 'Object' is not allowed; consider using a more specific type Although I can see the pages at hosted mode, but no data can't

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

2011-08-18 Thread Paul Robinson
GWT 1.5 introduced generics. Where before you might have had an RPC argument of ArrayList bar, you will now have ArrayListFoo bar See here: http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/ReleaseNotes_1_5_Rpc and here:

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

2011-08-18 Thread Juan Pablo Gardella
It's a WARN no an error. You can safely ignore it. 2011/8/18 David lujup...@gmail.com When I upgrade GWT version from 1.4.60 to 1.5.3 in my project, I run at hosted mode, I found many errors like below: [WARN] In order to produce smaller client-side code, 'Object' is not allowed; consider

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

2011-08-18 Thread David
thanks Juan Pablo Gardella, you said it is a WARN no an error, but why can'tno data be retrieved from server in hosted mode, and in web mode it work fine? I check my code, it should be ok, only there is the WARN message in hosted mode. -- You received this message because you are subscribed

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

2011-08-18 Thread David
Thanks Paul for you detail explaination. my model is as below: public class CTableData implements IsSerializable { public String tableId; public int currentPage; public int lastPage; public long totalRows; public List com.compositesw.web.client.ui.table.CRowDatarows = new