Deleting Rich Text Area set its value to null

Hello,
don’t really know if it is by design, but deleting all the content on a Rich Text Area set the property value to null, as opposed to and empty string. It looks to me a suboptimal option, since there is no semantic meaning in having a null at that point - assuming that a null default value could mean that the property was never edited - and it force to manage a null value in the code (personally, I’m just checking for null in the setter).

Hello @sadoun.jacob,

This behavior is typical for all text input fields in CUBA (TextField, TextArea, ResizableTextArea, RichTextArea, MaskedField, PasswordField). This is necessary so that the behavior of all platform components does not differ. You can use not only text input components to select a value for the model, but other components that return null if they are empty (LookupField, PickerField, etc.).
You can check if the field is empty or null with the isEmpty() method.

Regards,
Gleb