Oh, yeah... size() is a method from MarkupContainer. /** * Get the number of children in this container. * * @return Number of children in this container */ public final int size() { return children_size(); }
I don't know if for Repeaters would make sense to return how many items they contain. Probably not. -----Original Message----- From: Mark Daniel [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2008 6:35 PM To: users@wicket.apache.org Subject: Re: Newbie question Hi, Basically, getCart().getCheeses().size() != cartListView.size() On Wed, Dec 10, 2008 at 12:31 AM, Bruno Cesar Borges < [EMAIL PROTECTED]> wrote: > I think you are talking about the 'viewSize' property of ListView. > > This indicates how many "viewable" items will be displayed within a > ListView. > > > > -----Original Message----- > From: Mark Daniel [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 09, 2008 6:23 PM > To: users@wicket.apache.org > Subject: Newbie question > > > 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. > > *************************************************************************************************** > "Atenção: Esta mensagem foi enviada para uso exclusivo do(s) > destinatários(s) acima identificado(s), > podendo conter informações e/ou documentos confidencias/privilegiados e seu > sigilo é protegido por > lei. Caso você tenha recebido por engano, por favor, informe o remetente e > apague-a de seu sistema. > Notificamos que é proibido por lei a sua retenção, disseminação, > distribuição, cópia ou uso sem > expressa autorização do remetente. Opiniões pessoais do remetente não > refletem, necessariamente, > o ponto de vista da CETIP, o qual é divulgado somente por pessoas > autorizadas." > > > "Warning: This message was sent for exclusive use of the addressees above > identified, possibly > containing information and or privileged/confidential documents whose > content is protected by law. > In case you have mistakenly received it, please notify the sender and > delete it from your system. > Be noticed that the law forbids the retention, dissemination, distribution, > copy or use without > express authorization from the sender. Personal opinions of the sender do > not necessarily reflect > CETIP's point of view, which is only divulged by authorized personnel." > > *************************************************************************************************** > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > *************************************************************************************************** "Atenção: Esta mensagem foi enviada para uso exclusivo do(s) destinatários(s) acima identificado(s), podendo conter informações e/ou documentos confidencias/privilegiados e seu sigilo é protegido por lei. Caso você tenha recebido por engano, por favor, informe o remetente e apague-a de seu sistema. Notificamos que é proibido por lei a sua retenção, disseminação, distribuição, cópia ou uso sem expressa autorização do remetente. Opiniões pessoais do remetente não refletem, necessariamente, o ponto de vista da CETIP, o qual é divulgado somente por pessoas autorizadas." "Warning: This message was sent for exclusive use of the addressees above identified, possibly containing information and or privileged/confidential documents whose content is protected by law. In case you have mistakenly received it, please notify the sender and delete it from your system. Be noticed that the law forbids the retention, dissemination, distribution, copy or use without express authorization from the sender. Personal opinions of the sender do not necessarily reflect CETIP's point of view, which is only divulged by authorized personnel." *************************************************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]