Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

freemarker.template.utility: Javadoc index of package freemarker.template.utility.

Package Samples:

freemarker.template.utility: This package contains the core API's that most users will use.  


StandardCompress: A filter that compresses each sequence of consecutive whitespace to a single line break (if the sequence contains a line break) or a single space. In addition, leading and trailing whitespace is completely removed. Specify the transform parameter single_line = true to always compress to a single space instead of a line break. The default buffer size can be overridden by specifying a buffer_size transform parameter (in bytes). Note: The compress tag is implemented using this filter Usage: From java: SimpleHash root = new SimpleHash(); root.put( "standardCompress", new freemarker.template.utility.StandardCompress() ...
CaptureOutput: A transform that captures the output of a block of FTL code and stores that in a variable. As this transform is initially present in the shared variable set, you can always access it from the templates: <@capture_output var="captured"> ... </@capture_output> And later in the template you can use the captured output: ${captured} This transform requires one of three parameters: var , local , or global . Each of them specifies the name of the variable that stores the captured output, but the first creates a variable in a name-space (as <#assign>), the second creates a macro-local variable ...
NormalizeNewlines: Transformer that supports FreeMarker legacy behavior: all newlines appearing within the transformed area will be transformed into the platform's default newline. Unlike the old behavior, however, newlines generated by the data model are also converted. Legacy behavior was to leave newlines in the data model unaltered. Usage: From java: SimpleHash root = new SimpleHash(); root.put( "normalizeNewlines", new freemarker.template.utility.NormalizeNewlines() ); ... From your FreeMarker template: <transform normalizeNewlines> <html> <head> ... <p>This template has all newlines ...
Execute: Gives FreeMarker the the ability to execute external commands. Will fork a process, and inline anything that process sends to stdout in the template. Based on a patch submitted by Peter Molettiere. BE CAREFUL! this tag, depending on use, may allow you to set something up so that users of your web application could run arbitrary code on your server. This can only happen if you allow unchecked GET/POST submissions to be used as the command string in the exec tag. Usage: From java: SimpleHash root = new SimpleHash(); root.put( "exec", new freemarker.template.utility.Execute() ); ... From your FreeMarker ...
Constants: Frequently used constant freemarker.template.TemplateModel values. These constants should be stored in the freemarker.template.TemplateModel sub-interfaces, but for bacward compatibility they are stored here instead. Starting from FreeMarker 2.4 they should be copyed (not moved!) into the freemarker.template.TemplateModel sub-interfaces, and this class should be marked as deprecated.
HtmlEscape: Performs an HTML escape of a given template fragment. Specifically, < > " and & are all turned into entities. Usage: From java: SimpleHash root = new SimpleHash(); root.put( "htmlEscape", new freemarker.template.utility.HtmlEscape() ); ... From your FreeMarker template: The following is HTML-escaped: <transform htmlEscape> <p>This paragraph has all HTML special characters escaped.</p> </transform> ...
ObjectConstructor: An object that you can make available in a template to instantiate arbitrary beans-wrapped objects in a template. Beware of this class's security implications. It allows the instantiation of arbitrary objects and invoking methods on them. Usage is something like: myDataModel.put("objectConstructor", new ObjectConstructor()); And then from your FTL code: <#assign aList = objectConstructor("java.util.ArrayList", 100)>
XmlEscape: Performs an XML escaping of a given template fragment. Specifically, < > &quot ' and & are all turned into entity references. An instance of this tarnsform is initially visible as shared variable called xml_escape .
DeepUnwrap: Utility methods for unwrapping freemarker.template.TemplateModel -s.
DOMNodeModel: A convenient wrapper class for wrapping a Node in the W3C DOM API.
Collections12: Implementation of missing JDK 1.3 collection features for JDK 1.2
ToCanonical: Read in a template and convert it to a canonical format.
UndeclaredThrowableException: The equivalent of JDK 1.3 UndeclaredThrowableException.
JythonRuntime: A crude first pass at an embeddable Jython interpreter
StringUtil: Some text related utilities.

Home | Contact Us | Privacy Policy | Terms of Service