Suppose that you have a category with many related products.
Instead of calling the category's getProducts() method, do the following :
Category category = loadCategory(123);
Criteria productsCriteria = hibernateSession.createCriteria(Product.class);
productsCriteria.add(_expression_.eq("products", category);
List categoryProducts = productsCriteria.list();
Regards,
Vincent
On 12/17/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
oh and btw, idataprovider and dataview live in wicket-extensions wicket.extensions.markup.html.repeater.data package.
-IgorOn 12/17/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:you can either transform the set into a list, or you can use the dataview/idataprovider combination. very similar to the listview but requires an iterator instead of a list. see wicket-examples/repeaters.
-Igor
On 12/17/05, John Shields <[EMAIL PROTECTED] > wrote:I'm trying to use a ListView to display an associated collection loaded by Hibernate. The problem I have is that Hibernate's collections are all "Sets", but the ListView requires a List. I haven't been able to find an example that demonstrates displaying one-to-many relationships. Any suggestions on how to display that collection?
BTW: I'm really impressed with Wicket.
- John
