Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Wicket Repeater with backing Map

Tags:

java

wicket

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?

I would the output of the repeater to essentially be something like:

QuantityX : ItemName (ItemNum)

so for example:

2x : someItem (255609)

The map can change through user input, but I am familiar with refreshing component's markup with AJAX via Wicket. Your help is much appreciated.

like image 758
thatidiotguy Avatar asked Apr 19 '26 21:04

thatidiotguy


1 Answers

I ended up using ListView where the ListView Model held Map.Entry as suggested by Thorsten above. It works as intended, and thank you Thorsten.

like image 152
thatidiotguy Avatar answered Apr 22 '26 09:04

thatidiotguy