Issue Details (XML | Word | Printable)

Key: SM-77
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Matt Raible
Reporter: tomek ma?kowski
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Struts Menu

Closing </ul> tag not matching in CSSListMenuDisplayer when Menu item doesn't have children allowed to view

Created: 27/Mar/07 03:10 AM   Updated: 27/Mar/07 10:30 AM   Resolved: 27/Mar/07 10:30 AM
Component/s: Displayers
Affects Version/s: 2.4.2
Fix Version/s: 2.4.3


 Description  « Hide
In CSSListMenuDisplayer when top level menu item has childer but none of them is allowed to be displayed
only ending </ul> tag is printed which leads to corrupted HTML output.

This is caused by the fact that when printing starting tag <ul> there is a check:
                if (hasViewableChildren(menu)) {
                    out.println("\t\t<ul>");
                }

but ending tag </ul> is not guarded:
            // close the </ul> for the top menu
            if (level == 0) {
                out.println("</ul>");
            }

Sort Order: Ascending order - Click to sort in descending order
tomek ma?kowski added a comment - 27/Mar/07 03:15 AM
line 74 in CSSListMenuDisplayer should look:
if (level == 0 && hasViewableChildren(menu)) {

Matt Raible added a comment - 27/Mar/07 10:30 AM
Fixed in CVS. Thanks for the fix!