![]() |
||
|
||
![]() |
In simple cases you can build data models using java.lang and java.util classes:
Use java.lang.String for strings.
Use java.lang.Number descents for numbers.
Use java.lang.Boolean for boolean values.
Use java.util.List or Java arrays for sequences.
Use java.util.Map for hashes.
For example, let's build the data model of the first example of the Designer's Guide. For convenience, here it is again:
![]() | ![]() | ![]() | |
![]() |
| ![]() | |
![]() | ![]() | ![]() |
This is the Java code fragment that builds this data model:
![]() | ![]() | ![]() | |
![]() |
| ![]() | |
![]() | ![]() | ![]() |
Actually, you can drop objects of any class into the data model, and then access their Bean properties and their other fields from the template, but this will be discussed in later chapters.
![]() |
||
|
||
![]() |
![]() |
|
Page generated: 2004-06-15 22:17:59 GMT | FreeMarker Manual -- For FreeMarker 2.3 |