Example usage for com.liferay.portal.kernel.template TemplateConstants RENDER_STRICT

List of usage examples for com.liferay.portal.kernel.template TemplateConstants RENDER_STRICT

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.template TemplateConstants RENDER_STRICT.

Prototype

String RENDER_STRICT

To view the source code for com.liferay.portal.kernel.template TemplateConstants RENDER_STRICT.

Click Source Link

Usage

From source file:com.liferay.dynamic.data.mapping.form.field.type.BaseDDMFormFieldRenderer.java

License:Open Source License

@Override
public String render(DDMFormField ddmFormField, DDMFormFieldRenderingContext ddmFormFieldRenderingContext)
        throws PortalException {

    Template template = TemplateManagerUtil.getTemplate(getTemplateLanguage(), getTemplateResource(), false);

    template.put(TemplateConstants.NAMESPACE, getTemplateNamespace());
    template.put(TemplateConstants.RENDER_STRICT, Boolean.FALSE);

    populateRequiredContext(template, ddmFormField, ddmFormFieldRenderingContext);

    populateOptionalContext(template, ddmFormField, ddmFormFieldRenderingContext);

    return render(template);
}

From source file:com.liferay.dynamic.data.mapping.form.renderer.internal.DDMFormRendererImpl.java

License:Open Source License

protected String render(Template template, String namespace) throws TemplateException {

    Writer writer = new UnsyncStringWriter();

    template.put(TemplateConstants.NAMESPACE, namespace);
    template.put(TemplateConstants.RENDER_STRICT, Boolean.FALSE);

    template.processTemplate(writer);/* w  w  w  .  jav a 2s  .co  m*/

    return writer.toString();
}