Implemented TemplateWidget::setContent to ensure content always contains objects.