FIXED.
In the model code (com_mycomponent->models->mycomponent.php) , there is the implementation of loadFormData(). Typically, it looks like this:
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState('com_mycomponent.edit.mycomponent.data',array());
if (empty($data))
{
$data = $this->getItem();
}
return $data;
}
Adding the lines just before the return statement
$this->preprocessData('com_mycomponent.mycomponent', $data);
$params = $data->params['data'];
$data->params = $params;
solves the issue.