Difference between treetable.getContainerDataSource().getItemIds() & treeta


What is the difference between treetable.getContainerDataSource().getItemIds() & treetable.getItemIds()?

  1. Are they same? Can I use treetable.getItemIds() instead of getting the IDS from container?
  2. I add and delete the rows to container. In that case Is it ok to get ItemIds directly from the table rather than container?

The Table/Tree/TreeTable/other select components always use a Container as a data source. The Container is responsible for things like sorting and filtering. Calling Table.getItemIds() will return those items the container gives to the Table, which will not include any filtered ones. Calling Table.getContainerDatasource().getItemIds() will return the complete set.