Re: Filter data with wicket
Depending on the component you use to display the list there are a few differences in putting it all together but generally you should create a bean containing all your filter options. you can then pass the bean to your query and adjust it accordingly. If you use a ListView or DataView you have to make your own form to capture input for the filter, if you use a DataTable then that can be done automatically for you. Maurice On Jan 27, 2008 11:02 PM, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: Hi! I have a design question for wicket. In my Article page the user can filter the articles in many ways, by category, brand, price, department, gender etc. I wan't to Use the same wicketpage for the Article list. What is the best approach with wicket? make New ArticlePage().setDepartment( requestedDepartment ); and have different set, get methods for the filter objects or can someone point me in the right direction? Thanks -- View this message in context: http://www.nabble.com/Filter-data-with-wicket-tp15124809p15124809.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Filter data with wicket
I don't quit follow what you mean since I'm a newbie. Can you please explain in a little more detail or give me some pointers. -- View this message in context: http://www.nabble.com/Filter-data-with-wicket-tp15124809p15126484.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Filter data with wicket
suppose you have a single text keyword box: class searchpage extends webpage { private String keywords; public searchpage() { Form form=new Form(form); form.add(new TextBox(keywords, new PropertyModel(this, keywords))); add(new DataView(results, new MyDataProvider()) { protected void populateitem(item) { .. } }); } private class MyDataProvider implements IDataProvider { public Iterator iterator(int first, int count) { return query(first, count, keywords); } public int size() { return size(keywords); } } } -igor On Jan 27, 2008 4:59 PM, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: I don't quit follow what you mean since I'm a newbie. Can you please explain in a little more detail or give me some pointers. -- View this message in context: http://www.nabble.com/Filter-data-with-wicket-tp15124809p15126484.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]