clean forms after registration

I am wonder. I thought that ViewScope will end automatically by leave the side. But if I have a FormLayout and typing something e.g. in a TextField and go back and again to the view I see further display what I am have type.

I want register something but after them by the next call of the view I will not see the entry from the further registration.

UIScope and ViewScope not worked, have somebody else a plan?

Hi are you talking about Vaadin CDI add-on? Can you paste the problematic code?

I defined a UI with @CDIUI(“”) annotation and then added a navigator with CDIViewProvider. I have two views like below. What ever I create in @PostConstruct gets created everytime I navigate to the view in question.

@CDIView("myview")
public class MyView extends VerticalLayout implements View {

    @PostConstruct
    private void create() {
    }

    @Override
    public void enter(ViewChangeEvent event) {
        // TODO Auto-generated method stub

    }

}

@CDIView("myview2")
public class MyView2 extends VerticalLayout implements View {

    @PostConstruct
    private void create() {
    }

    @Override
    public void enter(ViewChangeEvent event) {
        // TODO Auto-generated method stub

    }
}

No I am not used CDI addOn