RE: [FreeMarker-user] Question about collections/sequences in datamodel
Generates text that depends on changing data (like dynamic HTML).
Brought to you by:
revusky
From: Steve S. <ss...@ti...> - 2003-04-06 20:51:11
|
Thanks. That worked great. Using ArrayList type of object was the key. On Sun, 2003-04-06 at 19:46, Steve Swett wrote: > What is the Java code for creating a collection or sequence and stuffing > subvariables into it? I've played around with SimpleCollection and > SimpleSequence and can't figure it out. The manual doesn't have an > example. Hi, Steve. In most normal use, you don't have to use things like SimpleSequence and so on. You can just use the objects in the regular java collections API and the various hidden machinery will convert things behind the scenes. So, in the case you mention, you could perfectly well just use java.util.ArrayList for the districts and the items in the ArrayList could be instances of java.util.HashMap |