On Mon, 30 Apr 2012 10:25:21 -0700 (PDT) cmagnollay <cmagnol...@gmail.com> wrote:
> So essentially I want to use Wicket 1.5 to display an item and its > associated quantity. The data structure I am using to back this is a > Map (new HashMap()) where Item is a POJ whose details are of no > consequence. Essentially I would like to use one of wicket's > repeaters, but I only have experience using ListView. Is there a > repeater that would work well with a Map, or am I going to need to > code my own? If I need to code my own, what is the best class to > override? > > The List has has key->value pairs of type: Item->Integer where > integer is the quantity. I'd just use Map#entrySet, which gives you a Set<Map.Entry<Item,Integer>>. You can turn that into a list and feed it to a ListView<Map.Entry<Item,Integer>>. That way you have an Entry in each ListItem and can simply use its two parts. Hope this helps. Carl-Eric --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org