Anonymous | Login | Signup for a new account | 12-17-2024 08:37 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0000707 | [Resin] | minor | always | 01-05-06 13:04 | 01-24-06 16:34 | ||||
Reporter | bregnvig | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.0.17 | ||||||
Summary | 0000707: c:forEach uses the requestScope for var attribute | ||||||||
Description |
I have a JSP that uses several c:import tag. In my action (I'm using Struts) I have the follwing line: request.setAttribute("cmsPage", cmsPage); In my imported "menu" page, which is imported before my content page, I have the following code (In this case it is not relevant where the "cmsPages" attribute comes from): <c:forEach var="cmsPage" items="${cmsPages}"> ${cmsPage.menu} </c:forEach> In my later imported content page I have something like this: <div> ${cmsPage.content} </div> The problem is that the "cmsPage" attribute in the menu page has now overridden my "cmsPage" attribute in the content page, leaving it as null or empty. My point is that the var attribute in the c:forEach tag, in this case "cmsPage" should have been stored in the pageScope. Not on the requestScope. The spec says the following about the var attribute: "This scoped variable has nested visibility." Not the case here. |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed. 26 unique queries executed. |