]
Marco Huber updated RF-8051:
----------------------------
Attachment: fixFor-RF-8051.zip
Here the files.
c:foreach not working in template files
---------------------------------------
Key: RF-8051
URL:
https://jira.jboss.org/jira/browse/RF-8051
Project: RichFaces
Issue Type: Bug
Components: CDK
Affects Versions: 3.3.2.SR1
Environment: Java 6, Windows XP Pro SP2
Reporter: Marco Huber
Attachments: fixFor-RF-8051.zip
Using c:foreach in a template file (.jspx) results in strange errors.
1st: The generated class missed a semicolon at the end of the for loop.
After investigation this error in the source, I found out that the velocity template was
incorrect (A brake was too much).
2nd: The wrong template was used in the ForEachTemplateElement.java.
if (this.strItems != null) {
indexForCollection++;
templateName = getTemplate1Name();//"FORElement_1.vm");
context.put("items", this.strItems);
context.put("index", new Integer(indexForCollection));
} else {
templateName = getTemplate2Name();//"FORElement_2.vm");
context.put("from", this.strFrom);
context.put("to", this.strTo);
}
Despite the comment in the source the template file names are switch in the
getTemplateXXXName methods. After fixing this all work correclty.
I attachted the corrected files, hoping they could be put in the next release.
Regards,
Marco
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: