i have a table loaded with IndexedContainer that has a property with a checkbox.
I’m trying know what items are checked as this :
Collection <Integer> ids=authorstable.getItemIds();
Iterator it=ids.iterator();
while (it.hasNext()){
CheckBox checkbox=(CheckBox) authorstable.getItem(it.next()).getItemProperty("checkbox");
if (checkbox.booleanValue()){
Author author=new Author((Integer)it.next(),null,null);
publication.addAuthor(author);
}
}
But shows and exception
com.vaadin.data.util.IndexedContainer$IndexedContainerProperty cannot be cast to com.vaadin.ui.CheckBox
How can i know which item is checked?
Thanks!