Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
707 | minor | always | 01-05-06 13:04 | 01-24-06 16:34 | |
|
|||||
Reporter: | bregnvig | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.0.17 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.0.18 | ||
|
|||||
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. |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|