FormData classes can contain two types of data holder classes:
- data holders for values associated with value fields (these holders always extend
AbstractValueFieldData
) and
- data holders for values associated with form data properties (these holders always extend
AbstractPropertyData
).
A form data property is generated if the associated form has a member variable whose setter and getter is annotated with @FormData
.
The method setPropertyByClass(...)
is intended to set the value of a form data property in a form data object.
The method cannot be used to set the label of a form.
The standard way to set the label of a field would be to load the form data from the server and to set the label afterwards, as in the following code snippet:
...
public class ModifyHandler extends AbstractFormHandler {
MyFormData formData = SERVICES.getService(IMyProcessService.class).load();
importFormData(formData);
getMyField.setLabel(formData.getMyProperty().getValue());
}
...