在coldfusion/railo中使用jopendocument时,如何添加表行?

在coldfusion/railo中使用jopendocument时,如何添加表行?,coldfusion,railo,opendocument,Coldfusion,Railo,Opendocument,我正在使用jopendocument 1.2和Railo 3.3.1.000 从 List months=new ArrayList(); 月份。添加(createMap(“一月”、“12”、“3”); 添加(createMap(“2月”、“8日”、“5日”); 添加(createMap(“3月”、“5日”、“12日”); 添加(createMap(“4月”、“1日”、“15日”); 添加(createMap(“5”、“3”、“21”)); 模板设置字段(“月”,月); 如何用cfml编写代码

我正在使用jopendocument 1.2和Railo 3.3.1.000

List months=new ArrayList();
月份。添加(createMap(“一月”、“12”、“3”);
添加(createMap(“2月”、“8日”、“5日”);
添加(createMap(“3月”、“5日”、“12日”);
添加(createMap(“4月”、“1日”、“15日”);
添加(createMap(“5”、“3”、“21”));
模板设置字段(“月”,月);
如何用cfml编写代码,或者有jopendocument经验的人如何用cfml在odt模板文件中添加行

List months=new ArrayList()

在CF术语中,该代码创建一个结构数组。因为java是强类型的,所以代码使用泛型来指示每个泛型包含的对象的类型

    List< Map<...> >          // Array containing structures 
    Map< String, String >     // Structure containing "String" values
    List< Map<...> >          // Array containing structures 
    Map< String, String >     // Structure containing "String" values
// Create an array of structures. Each structure represents a table row. 
// The key names for columns 1-3 are: "name", "min", "max"
months = [
            {name="January", min="-12", max="3"}
            , {name="February", min="-8", max="5"}
            , {name="March", min="-5", max="12"}
            , {name="April", min="-1", max="15"}
            , {name="May", min="3", max="21"}
            , {name="June", min="5", max="32"}
        ];  

// populate table rows
template.setField("months", months);