Monday 8 June 2020

Freemarker tutorial


      Introduction to Freemarker
      Hello World Application
      Interpolations
      Nested Objects example
      Basic Building Blocks
      Comments
      Escaping Sequences
      Raw String Literals
      Directives
      if directive
      #else directive
      elseif directive
      #list directive
      Specify list elements in the template
      Items in the list are expressions
      Concatenate lists or sequences
      list or sequence slicing
      #sep directive
      items directive
      #include directive
      Built-ins
      ?int built-in: Get division result as integer
      !: Set default value to missing or null values
      Arithmetic Operators
      Comparison Operators
      Logical Operators
      ??: Check for existence (null) of variable
      Assignment Operator
      Working with Map
      Define a map in template file
      Access map or hash content using index notation
      Concatenate maps or hashes
      Access list/sequence data using index notation
      Working with Ranges
      assign Directive: Define variables
      Working with Strings
            String concatenation
            Access a character in string using index notation
            String slicing
            Load the template from a string
            StringTemplteLoader: Load templates from strings
      Define Custom Directive
            macro: Define Custom Directive
            Define custom directive by implementing TemplateDirectiveModel interface
Previous                                                    Next                                                    Home

No comments:

Post a Comment