Important Notice - Forums is archived
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.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Allowing the removal of container property
how do make the container allow removing container property?
rana badr osman: how do make the container allow removing container property?
depends on a container.
the class import
import com.vaadin.data.Container;
so how would i know?
rana badr osman: the class import
import com.vaadin.data.Container;
so how would i know?
As Joonas mentioned, it depends on the container. For example, a BeanItemContainer doesn't allow the developer to remove properties while an IndexedContainer does. If you have code like this...
Container container = getSomeContainer();
... then check the implementation of getSomeContainer() to see which type of container(s) it returns.
Also, the question is, why do you want to remove a property from a container if it's added to the container in the first place? I don't know your use case, but often there is another way of accomplishing whatever you want to do. Quite often you don't actually want to remove the property, just restrict its visibility. For example, you might have a BeanItemContainer and you've assigned it as the data source for a table. Now you'll propably want to limit which properties are shown in the table. The correct way to do this is to use the table's setVisibleColumns() method to define which properties should be visible.