in populateItem(ListItem item) {
you can use item.getIndex();
-Igor
On 1/27/06, David Leangen <
[EMAIL PROTECTED]> wrote:
By the way, it seems to me that it would be useful to have access to the
index of the list. WDYT?
I know I need it, and it looks like I'll have to do some kind of
workaround to get it.
This is the code from ListView:
protected void internalOnBeginRequest()
{
....
// Loop through the markup in this container for each item
for (int i = 0; i < size; i++)
{
// Get index
final int index = firstIndex + i;
....
}
....
}
What about doing something like this?
private int currentIndex;
protected void internalOnBeginRequest()
{
....
// Loop through the markup in this container for each item
for (int i = 0; i < size; i++)
{
// Get index
final int index = firstIndex + i;
currentIndex = index;
....
}
....
}
public int getCurrentIndex()
{
return currentIndex;
}
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
