but my issue is i dont want to iterate through the list completely . i want to do stop at a certain number ..
Here is what i am trying to do in scriptlet
Code:
for (int j = firstDay; j < 7; j++) {
List project = (List)releaseList.get(day);
if (project != null && project.size() != 0) {
out.println("<td width='10%' align='right' valign='top' bgcolor='"+ CalendarUtil.getWeekEndColor(year, month-1, day+1) + "'><table>");
out.println("<tr width='100%'><td align='right' width='100%' valign='top'><b>"+ (day+1) + "</b></td></tr>");
for (int k = 0; project != null && k < project.size(); k++) {
ReleaseScheduleData pi =(ReleaseScheduleData)project.get(k);
if (pi.getReleaseType().equalsIgnoreCase("ecm freeze")) {
out.println("<tr width='100%' align='left'><td width='100%' bgcolor='"
+ pi.getBackGrndColor() + "'><font color='#FF0000'> "
+ pi.getReleaseName() + " </font></td></tr>");
} else if (pi.getReleaseType().equalsIgnoreCase("content only freeze") || pi.getReleaseType().equalsIgnoreCase("combo freeze")
|| pi.getReleaseType().equalsIgnoreCase("code only freeze")) {
out.println("<tr width='100%' align='left'><td width='100%' bgcolor='"
+ pi.getBackGrndColor() + "'><font color='#FF0000'> "
+ pi.getReleaseName() + " </font></td></tr>");
} else if (pi.getReleaseType().equalsIgnoreCase("Weekly Maintenance")) {
out.println("<tr width='100%' align='left'><td width='100%' bgcolor='"
+ pi.getBackGrndColor() + "'><font color='#FF0000'> "
+ pi.getReleaseName() + " </font></td></tr>");
}
}
out.println("</table></td>");
} else {
out.println("<td width='10%' align='right' valign='top' bgcolor='"+ CalendarUtil.getWeekEndColor(year, month-1, day+1) + "'><b>" + (day + 1) + "</b></td>");
}