Ooops, I got it...
once I add back the
'selected-menuitem-context-field-name="tabButtonItem"'
And mark the highlighted item as follow
<set field="tabButtonItem" value="forum"/>
I got the <li> with the class attribute
<li class="selected">
<a href="/control/forum?forumId=">forum</a>
</li>
-----Original Message-----
From: Mike Wong [mailto:
[hidden email]]
Sent: Sunday, April 15, 2007 11:38 PM
To:
[hidden email]
Subject: Question about Menu widget
Hi,
I've been trying to use the menu widget to getting a particular menu link
highlighted but failed.
1) My "Menus.xml" file defined a menu named "header-bar" with menu-item
named "forum"
<menu name="header-bar" default-menu-item-name="forum" type="simple"
default-selected-style="selected" id="nav"
default-title-style="titleStyle">
<menu-item name="nav-home" title="home">
<link target="." id="nav-home"/>
</menu-item>
<menu-item name="forum" title="forum">
<link target="forum?forumId=${forumId}"/>
</menu-item>
...
2) I try to highlighted the forum menu item and set the "headerItem" to
"forum" in the CommonScreens.xml > screen=main
<set field="headerItem" value="forum"/>
3) But the HTML generated didn't have the style attribute (class="selected")
<ul>
<li><a href="/control/." id="nav-home">home</a></li>
<li><a href="/control/forum?forumId=">forum</a></li>
<li><a href="/control/faq?faqId=">faq</a></li>
<li><a href="/control/joinUs">join us</a></li>
<li><a href="/control/contactUs">contact us</a></li>
</ul>
Anything I've done wrong?
Thanks
Mike