class TextAreaFieldRenderer extends FieldRenderer<TextAreaFieldDefinition, DefaultFormGroup> implements RequiresValueConverter {

    @Override
    protected FormGroup getFormGroup(RenderMode renderMode) {

        DefaultFormGroup formGroup = formGroupsInstance.get();

        if (renderMode.equals(RenderMode.PRETTY_MODE)) {
            formGroup.render(new HTML(), field);
        } else {
            String inputId = generateUniqueId();

            textArea.setId(inputId);
            textArea.setName(fieldNS);
            textArea.setPlaceholder(field.getPlaceHolder());
            textArea.setVisibleLines(field.getRows());
            textArea.setEnabled(!field.getReadOnly());

            formGroup.render(inputId, textArea, field);

            registerFieldRendererPart(textArea);
        }

        return formGroup;
    }

}