Best way to work with the iterator of IDataProvider

2009-09-28 Thread Charles Moulliard
Hi, I would like to know what is the best way to work with the method iterator of DataProvider. I have created a class implementing IDataProvider. Depending of a parameter, the DAO service called is not the same inside in the iterator method. For some DAO services, a list is returned but for one

Re: Best way to work with the iterator of IDataProvider

2009-09-28 Thread T Ames
I see several undefined objects: result requestFormModel it If these are defined at the class level, they must be serializable. If you have Logging set at Info, Wicket will give you the actual field that is not serializable, although from the error it looks like something to do with

Re: Best way to work with the iterator of IDataProvider

2009-09-28 Thread T Ames
Further, you don't really need to define the Iterator, just return them. public Iterator iterator(int first, int count) { result = new ArrayListPlatformDTO(); if (requestFormModel != null) { if (requestFormModel.getId() != null) {

Re: Best way to work with the iterator of IDataProvider

2009-09-28 Thread vineet semwal
Iterator is not serializable, wicket will try to serialize it if it's at class level so either move it inside iterator method or make it transient , In your case,you can easily move it inside method ;) -- regards, Vineet Semwal On Mon, Sep 28, 2009 at 6:42 PM, T Ames tamesw...@gmail.com wrote:

Re: Best way to work with the iterator of IDataProvider

2009-09-28 Thread cmoulliard
I have found the error. List Result = new ArrayListPlatformDTO(); must be defined outside of the iterator method and also the answer to my question. When the result is empty or null, then I must return a null iterator T Ames wrote: I see several undefined objects: result