class TextAreaFieldInitializer implements FieldInitializer<TextAreaFieldDefinition> {

    @Override
    public void initialize(TextAreaFieldDefinition field,
                           FieldElement fieldElement,
                           FormGenerationContext context) {
        String rows = fieldElement.getParams().getOrDefault("rows",
                                                            "3");

        Integer value = Integer.valueOf(rows);

        if (value != null) {
            field.setRows(value);
        }
    }

}