Package org.restlet.ext.freemarker

Examples of org.restlet.ext.freemarker.TemplateRepresentation


        else {
            //use a fallback
            templateName = "Object.ftl";
        }
       
        return new TemplateRepresentation( templateName, configuration, object, getMediaType() );
    }
View Full Code Here


    map.put("appMenu", buildMenu());
    map.put("rc", getTranslation());
    map.put("baseRef", getRootRef());
    map.put("user", getUser());
    map.put("pageRef", getRootRef() + "/" + getBasePath());
    TemplateRepresentation template = new TemplateRepresentation(templateName, getApplication()
        .getFreemarkerConfiguration(), map, MediaType.TEXT_HTML);
    template.setCharacterSet(CharacterSet.UTF_8);
    return template;
  }
View Full Code Here

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("title", Constants.getName());
    map.put("reason", status.getReasonPhrase());
    map.put("description", status.getDescription());   

    TemplateRepresentation template = new TemplateRepresentation("error.html", configuration, map,
        MediaType.TEXT_HTML);
    template.setCharacterSet(CharacterSet.UTF_8);
    return template;
  }
View Full Code Here

TOP

Related Classes of org.restlet.ext.freemarker.TemplateRepresentation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.