FieldGroup has its own
ReadOnly and
Enabled properties. With these, you can set all fields managed by the FieldGroup to read-only or disable them. When you bind a field to an item property with FieldGroup, the bound field is configured according to the current values of
ReadOnly and
Enabled of FieldGroup which will override any settings the field had before binding. A simple solution to your problem would be to make your TextField read-only after binding it with FieldGroup, like so:
TextField pseudonymTextField = new TextField("Pseudonym");
fieldGroup.bind(pseudonymTextField, "pseudonym");
addComponent(pseudonymTextField);
pseudonymTextField.setReadOnly(true);
Edit: There’s been filed a bug regarding the behaviour of FieldGroups in such a scenario:
#9076