Git Product home page Git Product logo

velocity-b4x's Introduction

velocity-b4x

A wrap of Apache Velocity Engine library for B4A and B4J (b4xlib)

What is Velocity?โ€‹

Velocity is a Java-based template engine. It permits anyone to use a simple yet powerful template language to reference objects defined in Java code.

Source: https://velocity.apache.org/

Download additional libraries:

velocity-engine-core-2.3.jar
commons-lang3-3.12.0.jar
slf4j-api-2.0.7.jar (required if not using jServer)
slf4j-simple-2.0.7.jar (required if not using jServer)

Change Logs:

v1.01 - Changed to b4xlib. Modified Initialize method.
v1.02 - Added evaluate method. Added example project.
v1.03 - Renamed Text method to ToString. Removed redundant references for slf4j libraries in manifest.txt which already existed in jServer.

Velocity

Author: aeric
Credit to: Daestrum
Version: 1.03

Methods:

Initialize (Directory As String)
Initializes the object. You can pass a default directory inside Objects directory

put (Key As Object, Value As Object)
Put Context with Key Value pair

putMap (m As Map)
Put Context by passing a Map

merge
Merge Template with Context and pass to StringWriter

mergeTemplate (TemplateFile As String, Encoding As String)
Merge a Template with Context and pass to StringWriter

evaluate (Tag As String, TemplateString As String)
Evaluate TemplateString

Properties:

get (Key As String) As Object [read only]
Get the Context by Key

Template As String [write only]
Load a Template file

ToString As Object [read only]
Return StringWriter as String

velocity-b4x's People

Contributors

pyhoon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.