How to access the TextField of a BeanFieldGroup?


how can I access the TextField that is created within the following statement:

BeanFieldGroup<MyBean> binder = new BeanFieldGroup<MyBean>(MyBean.class);
layout.addComponent(binder.buildAndBind("Name:", "name"));

I’d like to set:

textField.setInputPromt("type my bean");
textField.setRequiredError("name required");

But how can I get this textfield?

How about: TextField textField = (TextField) binder.getField("name"); or if that doesn’t work: Field<?> textField = binder.getField("name");

PS: Next time: Could you please look through the methods of a class and it’s javadoc and look if there are similar questions already on this forum before posting a new thread.