I'm using a DefaultDataTable and I want to get the index of the selected
item.  However the index always returns 0.  Is this by design?

                 new AbstractColumn(new Model("Test Label"))
                        public void populateItem(Item item, String componentId, 
IModel model)
                                int selectedIndex = item.getIndex();  //this 
always returns 0;                          

However, with a dataView, I do get the item index:

                dataView = new DataView("dataview", dp)
                        protected void populateItem(final Item item)
                                int selectedIndex = item.getIndex();  
//increments by 1 with each

I considered using a DataView instead of the DefaultDataTable, but the DDT
has the toolbars and such already nicely built in.  Looking at the code, it
seems like an Item in a DataView represents the entire row
whereas in the DataGridView from the DefaultDataTable, it represents a cell. 
Is this why the behavior
is different?

Thanks very much.
View this message in context: 
Sent from the Wicket - User mailing list archive at Nabble.com.

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

Reply via email to