datamodel - Why freemarker not reading my Java object (POJO)? -
i using freemarker process html elements, inside template file, can read 1 of legacy java object giving ${form.fontstyle}
, doesn't read newly created java object"
public class sectionheaderinfo implements serializable { private static final long serialversionuid = 1l; // form object holds setting of form. private form form; // form section object private formsection section; private string languagetext; public string name; public sectionheaderinfo(form form, formsection section, string languagetext) { this.form = form; this.section = section; this.languagetext = languagetext; } public void getname() { return "whatever"; }
i added getname
testing, complains
caused by: freemarker.core.unexpectedtypeexception: "." left-hand operand: expected hash, evaluated (wrapper: com.xxx.sectionheaderinfo):
i compared 2 java classes, tried implements templatemodel, serializable
, nothing can work. missing here ?
Comments
Post a Comment