struts menu - 'active' menu css doesnt work
I am using struts menu in my project.
The problem is the active menu does not get high lighted. I figured out where the logic for th开发者_如何学Gois is -
In ccHorizontalMenu.vm
#if ($menu.name == $currentMenu)
<a href="$url" title="$title" class="current" #if($menu.target)target="$menu.target" #end#if($menu.width)style="width: ${menu.width}px"#end>${title}</a>
#else
<a href="$url" title="$title" #if($menu.target)target="$menu.target" #end#if($menu.width)style="width: ${menu.width}px"#end>${title}</a>
#end
Since I have not set the $currentMenu variable the condition is failing and #else is getting executed. On googling I found $currentMenu should be set like this -
<c:set var="currentMenu" scope="request"><decorator:getProperty property="meta.menu"/></c:set>
but I dont know where to set it....also where is meta.menu defined??
Any ideas?
I added the code to default.jsp and it worked!
I close my own issue.
精彩评论