|
[
Permalink
| « Hide
]
Matt Raible added a comment - 17/Oct/06 06:28 AM
Can you provide a more detailed example? I'd like to try and reproduce this in order to fix it. Are you using the Java or Velocity version of the CSSListMenu?
Using the java version.
In the menu-config I have something like: <Menu name="level1Menu" title="Level1" location="/test/page1.do"> <Item name="level2Menu" title="Level2" page="/test/page2.do"> <Item name="level3MenuEntrya" title="Level3a" page="/test/page3a.do" roles="ROLE_A"/> <Item name="level3MenuEntryb" title="Level3b" page="/test/page3b.do" roles="ROLE_A"/> </Item> </Menu> No roles on level1 and level2 menu so everybody gets level1 and it contains the level2 menu. Both level3 entries have a role specified so only people in ROLE_A see the level3 entries for the level2 menu. Users without ROLE_A don't get the level3 entries. The html that gets produces for a non ROLE_A user is empty UL tags for level3 nested in the level2 li. <li class="menubar"> <a href="/test/page1.do">Level1</a> <ul> <li class="menubar"> <a href="/test/page2.do">Level2</a> <ul> </ul> </li> </ul> </li> I've been able to solve this one in the Velocity template, but I'm having a hard time in the Java version. If you figure it out by patching CSSListMenuDisplayer, please let me know.
I tried to fix it by buffering the output instead of writing it out directly and then testing for any content before writing out the <ul>. Due to the reflexive nature of the code, it wasn't so easy. The output kept coming out incorrect.
If I have time I'll try it again. I managed to fix it shortly after posting the comment yesterday. Have you tried the latest code from CVS? I hope to do a release in the next hour or two.
Can't get the latest code from CVS because i'm behind a proxied firewall at work. cvsgrab 2.2.2 (latest version) doesn't support viewcvs 1.0.1 using by this cvs repo.
Have to wait till I get home tonight. Or, if you put the jar somewhere i can download it, i'll be happy to test/check it. You can download the JAR from http://static.appfuse.org/downloads/struts-menu-2.4.2.jar
|
||||||||||||||||||||||||||||||||||