Re: Determine Last Item in a ListView

2015-02-19 Thread Tobias Soloschenko
Hi,

even better! That's the way I would do it by myself! :-)

kind regards

Tobias

> Am 19.02.2015 um 12:05 schrieb Simon B :
> 
> Hi Tobias, 
> 
> Thanks for your answer.
> 
> I've decided to use the ListView#getViewSize method
> 
> so my check is as follows: 
> 
>if ((item.getIndex() + 1) == getViewSize()) {
>   // do last item stuff here
>   item.add(new AttributeModifier("class",
> "lastItemClass"));
>}
> 
> Cheers
> 
> Simon
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Determine-Last-Item-in-a-ListView-tp4669641p4669643.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Determine Last Item in a ListView

2015-02-19 Thread Simon B
Hi Tobias, 

Thanks for your answer.

I've decided to use the ListView#getViewSize method

so my check is as follows: 

if ((item.getIndex() + 1) == getViewSize()) {
   // do last item stuff here
   item.add(new AttributeModifier("class",
"lastItemClass"));
}

Cheers

Simon

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Determine-Last-Item-in-a-ListView-tp4669641p4669643.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Determine Last Item in a ListView

2015-02-19 Thread Tobias Soloschenko
Hi,

you can get the index of the item with ListItem.getIndex() and compare it with 
the last index of the model object. 

kind regards

Tobias

> Am 19.02.2015 um 11:34 schrieb Simon B :
> 
> Hi, 
> 
> First of all thank you for creating Wicket its awesome, now that I'm a bit
> more familiar with it, I'm continually delighted by it.
> 
> Secondly could someone tell me what the best way of determining whether an
> item passed to the method:
> 
> protected void populateItem(ListItem item); 
> 
> is the last item?
> 
> Cheers
> 
> Simon
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Determine-Last-Item-in-a-ListView-tp4669641.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Determine Last Item in a ListView

2015-02-19 Thread Simon B
Hi, 

First of all thank you for creating Wicket its awesome, now that I'm a bit
more familiar with it, I'm continually delighted by it.

Secondly could someone tell me what the best way of determining whether an
item passed to the method:

 protected void populateItem(ListItem item); 

is the last item?

Cheers

Simon

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Determine-Last-Item-in-a-ListView-tp4669641.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org