@Override
public String render(RegionWidgetWrapper item, RenderContext context) {
Widget widget = item.getWidget();
String type = widget.getType();
if (!Constants.WIDGET_TYPE.equals(type)) {
throw new NotSupportedException("Invalid widget type passed to renderer: " + type);
}
RegionWidget regionWidget = item.getRegionWidget();
String widgetScript = getWidgetScript(regionWidget, widget);
// the key is based off the RegionWidget.id to ensure uniqueness