javawicketwicket-7

Data View is not populated in wicket7


I have implemented below code for repeating view

DataView documents = new DataView("documents", dataProvider, new Long(20)) {
   @Override
   protected void populateItem(Item item) {
   //do some code
};

When I debug the code, debug point is not going inside of populateItem method, while dataprovider is having list of document and implement Idataprovider interface, so due to this there is no data is populated.

We have moved application from wicket 1.3 to 1.7 after that we are facing this problem.

I don't know why it behaves like this.


Solution

  • I got solution after so many debug. problem is wicket migration.

    earlier we are using wicket 1.3 and in this one IDataProvider having Iterator<? extends T> iterator(int first, int count); and now wicket 1.7 changed with Iterator<? extends T> iterator(long first, long count); so we override this method with return null; value that's why we are getting null in data Provider.