manny8086
manny8086

Reputation: 509

Vaadin FieldGroup unbind

How can i unbind or remove any field from FieldGroup in Vaadin 7.

For example if I am binding a TextField (assume required bean classes are there) like below and want to unbind/remove it for some condition after.

TextField sometextfield= new TextField();
sometextfield.setId("attributeName");   
sometextfield.setNullRepresentation("");
sometextfield.setMaxLength(100);
sometextfield.setWidth("200px");
sometextfield.setCaption("Some text field");
sometextfield.setImmediate(true);
bind(sometextfield, "atextfield");
somelayout.addComponent(sometextfield);

Upvotes: 0

Views: 356

Answers (1)

André Schild
André Schild

Reputation: 4754

Had you a look at the docu?

public void unbind(Field<?> field)
            throws FieldGroup.BindException

Detaches the field from its property id and removes it from this FieldBinder.

Note that the field is not detached from its property data source if it is no longer connected to the same property id it was bound to using this FieldBinder.

FieldGroup Javadoc

Upvotes: 1

Related Questions