Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Wicket Filter form using Dataview/IDataProvider

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm listing some objects in a page using Dataview, DataProvider and LoadableDetachableModel.
I'm planning to add a form filter with some input boxes and a Filter button.
I was thinking on modifying somehow the DataProvider, and also the dao.
However, I'm not sure what is the best approach to pass the parameters to the DataProvider. Should I use a model?
Please can you advice?

Thanks.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Could you find solution to this ? If yes, please share that.
I also have a similar requirement.

Thanks
 
Fernando Sproviero
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I ended creating a class that implements IDataProvider.
Inside this class I have some properties:
-Service (could also be a DAO)
-filter properties.
-methods:



And GenericDetachableModel:




When the GenericDataProvider class is constructed, I pass the service (or dao) and the filter params.
Hope this helps.

 
I'm gonna teach you a lesson! Start by looking at this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!