To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
I have updated a Grid from using a BeanItemContainer to a GeneratedPropertyContainer to support Buttons in the Grid. This worked as advertised, very happy.
However some code that operated on Grid stopped working. The error I get is: GeneratedPropertyItem cannot be cast to com.vaadin.data.util.BeanItem The line of code in question is: BeanItem<EntityBase> beanItem = (BeanItem<EntityBase>)getEditorFieldGroup().getItemDataSource();
I put the following of code in to inspect when debugging: Item item = getEditorFieldGroup().getItemDataSource(); This shows that item contains the bean I am after.
How do I get a Bean out of item from a GeneratedPropertyContainer ?