Refresh on Table and BeanIteamContainer


Hey guys, I’d like to know how to refresh my table when I put a new Bean.

I know that container.refresh() exists with JPAContainer but the BeanIteamContainer doesn’t contain that method.

I tried a table.refreshRowCache() but that’s the same thing… When I try to add an item it doesn’t refresh with DAO request (database) or addItem().

However, when I remove an item with container.removeItem(Item i) it updates dynamically the table …

Hey Remy,

Hmm, in my test application, the table is automatically updated if I add items to its BeanItemContainer. How are you adding new beans?

I think I found the problem… To add new beans in my table I was using this DAO request : DAO.get().save(myBean);
So the bean was added in my database but was not updated dynamically on it. So I tried table.addItem(myBean) below this request and it seems to work :slight_smile: Sorry for inconvenience…

No problem, glad you got it sorted :slight_smile: