/** * <p>This method is declared by the <code>TemplateDirectiveModel</code> interface that the abstract * superclass <code>AbstractFreeMarkerDirective</code> implements. It retrieves any properties supplied * when invoking the directive and passes them onto the <code>RenderService</code> methods. */ @SuppressWarnings({ "unchecked", "rawtypes" }) public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException { String componentId = getStringProperty(params, "componentId", true); String chrome = getStringProperty(params, "chrome", false); boolean chromeless = getBooleanProperty(params, "chromeless", false); getRenderService().renderComponent(getRequestContext(), RenderFocus.BODY, componentId, chrome, chromeless); } }
/** * <p>This method is declared by the <code>TemplateDirectiveModel</code> interface that the abstract * superclass <code>AbstractFreeMarkerDirective</code> implements. It retrieves any properties supplied * when invoking the directive and passes them onto the <code>RenderService</code> methods. */ @SuppressWarnings({ "unchecked", "rawtypes" }) public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException { String componentId = getStringProperty(params, "componentId", true); String chrome = getStringProperty(params, "chrome", false); boolean chromeless = getBooleanProperty(params, "chromeless", false); getRenderService().renderComponent(getRequestContext(), RenderFocus.BODY, componentId, chrome, chromeless); } }