you gave listview a list instance, but its probably not the same
instance of list you are adding items to. that is why the original
code uses a model to give listview the list. read the models
chapter...

-igor

On Tue, Dec 9, 2008 at 12:23 PM, Mark Daniel <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I'm following the wicket in action book. I'm trying the cheese store in
> chapter 3. I was following along the code by reading a bit and coding a bit
> on my own. The code defining the ListView for the cheese cart is originally:
>
> add(new ListView("cart", new PropertyModel(this, "cart.cheeses")) { ... }
>
> The way I ended up coding it was:
>
> add(new ListView("cart", getCart().getCheeses())) { ... }
>
> Which seems to be working fine, but If I click repeatedly fast on the 'add
> to cart' link, the ArrayList in session gets its size changed correctly when
> adding elements, but the ListView element size doesnt change accordingly.
> Basically, the list size keeps growing on each click,  but the number of
> items in the ListView doesnt grow anymore.
>
> Any ideas whats wrong?
>
> Thanks.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to