// If the content of the template was not empty, use it.
// Otherwise don't use empty template but render as if there
// was no template (icon and title by default).
if (hasTemplate) {
TickerTapeDefaultRenderer tickerTapeRenderer = (TickerTapeDefaultRenderer)
getWidgetDefaultModule(protocol).getWidgetRenderer(TickerTapeAttributes.class);
tickerTapeRenderer.setItemTemplateId(attributes.getId());
CarouselDefaultRenderer carouselRenderer = (CarouselDefaultRenderer)
getWidgetDefaultModule(protocol).getWidgetRenderer(CarouselAttributes.class);
carouselRenderer.setItemTemplateId(attributes.getId());