I have a table displaying items in reverse chronological order, so if a new item comes, it has to be displayed as the first row in the table. is there a way to do this?
The method addItemAfter(Object previousItemId) adds the new after the given item, I’m looking for some thing like addItemBefore(Object nextItemId).
Depends on the container implementation. E.g. IndexedContainer has a method addItemAt(int index), but BeanItemContainer doesn’t support it. How about calling container sort after every new item addition.
For BeanItemContainer, I discovered that the following works, but it could be just by accident. Perhaps the frame work swallows a npe, and just puts it at the top by default?