By original source, I meant I just tried it on the book source code
download.
On Wed, Dec 10, 2008 at 1:20 AM, Mark Daniel <[EMAIL PROTECTED]> wrote:
> Hi Igor,
>
> I just changed one line the original source (in my original post), and
> built a war and deployed on tomcat, and got the behavior I mentioning. I
> think they both point to the same list.
>
>
> On Wed, Dec 10, 2008 at 1:12 AM, Igor Vaynberg <[EMAIL PROTECTED]>wrote:
>
>> 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]
>>
>>
>