How to prevent BeanValidation when form is not commited?

Hi,

I have a simple form that should validate a field. I use BeanFieldGroup with automatic BeanValidation creator.

Problem: when the form is initially shown, the validation should not take place as long as no user input / submit is done. But I see a validation already.


class Payment {
	@NotNull
	BigDecimal amount;
}

FormLayout form = new FormLayout();
BeanFieldGroup<Payment> binder = new BeanFieldGroup<Payment>(Payment.class);
form.addComponent(binder.buildAndBind("Amount", "amount"));
TextField amount = (TextField) binder.getField("amount");
amount.setInputPromt("0.00");
amount.setImmediate(false); //does not matter

Result:
When the form is initially displayed, the validation somehow already takes place and the red exclamation mark is shown for this field!

Why?

Duplicate:
Thread #2479966