I am facing a problem with <@spring bind ... /> macro in FTL .
Question 1 : is <@spring bind .. /> macro adhere to Java 5 features ?
Let me explain my issue :
My Domain Objects:
My Model Attribute:Code:class ParentRecord{ private String rawData; //getters & setters .. } class ARecord extends ParentRecord{ String orginalValue; //getters & setters .. } class BRecord extends ParentRecord{ String previousValue; //getters & setters .. }
Controller:Code:class JobRecords{ List<? extends ParentRecord> list= new ArrayList<ParentRecord>(); //getters & setters .. }
In the above method based on the jobName , corresponding list of objects will be added (i.e List of ARecord or BRecord) .Code:@RequestMapping(value = "/jobs/pre/{jobName}", method = RequestMethod.POST) public String launch(ModelMap model@ModelAttribute("jobRecords") JobRecords jobRecords,Errors errors,..){ ... jobRecords.setList(records); ...
From the FTL , I am able to access the model attriubtes values.
when I post the form , it unable to dynamic object (ARecord) contents .I can figure out that Spring bind macro has only intialized List of ParentRecords not list of Arecord objects will submission .Code:.. <@spring.bind "jobRecords.list[${content_index}].originalvalue" /> <td><input type="text" name="${spring.status.expression}" value="${spring.status.value?default("")}" /></td> ..
Can any one help me in resolving this issue


Reply With Quote
