-
Book Overview & Buying
-
Table Of Contents
Apache OfBiz Cookbook
Many times, it is convenient to call an OFBiz Java utility or tool directly from within FreeMarker. The OFBiz FreeMarker implementation allows for calling Java methods (utilities and tools) directly from within FreeMarker directives.
Java methods may be called from FreeMarker in the following way:
1. Open the FreeMarker template file.
2. To call an OFBiz Java method, use the FreeMarker assign directive and be sure to use the full Java packaging notation for the method as shown here:
<#assign value =
Static["org.ofbiz.base.util.UtilProperties"]. getPropertyValue("general.properties", defaultUrl)>
3. Close the file.
Note: Changes to FreeMarker files are immediate. You do not need to restart OFBiz.
The FreeMarker program is a Java Application (not to be confused with an OFBiz web application) that takes FreeMarker directives, HTML markup, and prepared data and creates HTML destined for a browser. FreeMarker runs within...
Change the font size
Change margin width
Change background colour