@Override
public int doStartTag() throws JspException {
if (regionWidget != null && getBean().getSupportedWidgetTypes().contains(regionWidget.getWidget().getType()) ) {
if ( regionWidget.getWidget().isDisableRendering() ) {
ScriptManager scriptManager = getBeanFromContext(ScriptManager.class);
String widgetScript = String.format(DISABLED_SCRIPT_BLOCK, regionWidget.getRegion().getId(),
regionWidget.getId(),
StringEscapeUtils.escapeJavaScript(regionWidget.getWidget().getDisableRenderingMessage()),
regionWidget.isCollapsed(),
regionWidget.getWidget().getId());
String key = REGISTER_DISABLED_WIDGET_KEY + "-" + regionWidget.getWidget().getId();
scriptManager.registerScriptBlock(key, widgetScript, ScriptLocation.AFTER_RAVE, RenderScope.CURRENT_REQUEST, getContext());
} else {
writeString(getBean().render(regionWidget, getContext()));
}
}
else {