-
Book Overview & Buying
-
Table Of Contents
Apache OfBiz Cookbook
Some people find writing XML code to create HTML counterintuitive. For those who choose not to use OFBiz widgets but would rather write HTML directly using FreeMarker, this section is for you.
The following prerequisites are needed to be taken care of:
1. At a minimum, you will need to define a Screen widget with a widgets element declaration pointing to your FreeMarker template file.
2. For any required data preparation, add declarations to the actions portion of the Screen widget definition.
3. If needed, create any Groovy or BeanShell scripts in preparation for screen rendering.
4. Open an existing FreeMarker file or create a new one.
Add HTML and/or FreeMarker directives to your file. For example, a simple web page that displays "Hello World" might have the following content:
<html xmls="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="<@ofbizContentUrl>/images/default.css</@ofbizContentUrl...
Change the font size
Change margin width
Change background colour