Hi,

I'm very young on the Wicket planet, so please excuse my simple question 
related to DataView/IDataProvider

My configuration:
1. I use a DataView (MyDataView)
2. I added a PageNavigator to MyDataView
3. I defined a IDataProvider attached to  MyDataView (MyDataProvider)
4. MyDataProvider has a not-serializable field (MyField)
5. MyField is used in the method MyDataProvider.size()
6. I use Wicket 1.4.0

What I do:
1.  In the method MyDataProvider.detach() , I nullify MyField (MyField = null)

What happens:
1. When I navigate through pages, I get a NPE in MyDataProvider.size() as 
MyField became null

How I fixed it:
1. I overrode in MyDataView the method getDataProvider(). Didn't work. I 
noticed that this method is never invoked
2. I tested again null in MyDataProvider.size(). If MyField is null, I just 
reinitialize it. It works

My question is if this solution is the optimal one, or there is a better one?

Thanks,
kaltman 



      

Reply via email to