Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.1.2
-
None
-
Windows XP Pro 2002 SP2, WebLogic 8.1 SP4 (running on BEA JDK 1.4.1_05)
Description
In the Tomahawk 1.1.2 class org.apache.myfaces.custom.navmenu.NavigationMenuItem, a new "disabled" field was added. However, this field does not seem to be used; in particular, the NavigationMenuItem.setDisabled mutator method is never called, and the "disabled" attribute of the HtmlNavigationMenuItemTag is never propagated to NavigationMenuItem.
Instead, the disabled flag derived from the "itemDisabled" and "enabledOnUserRole" tag attributes is passed through the NavigationMenuItem constructor, and in turn is propagated to the SelectItem constructor. The problem is that, because NavigationMenuItem's disabled field is masking the superclass field, the isDisabled() method always returns false. This, in effect, prohibits the "itemDisabled" or "enabledOnUserRole" tag setting for the Tomahawk navigationMenuItem tag from having any effect.
NavigationMenuItem should be modified, and the disabled field, along with is accessor / mutator, should be removed in favor of using SelectItems isDisabled() / setDisabled methods.
NavigationMenuUtils should be modified to derive the disabled flag from the "disabled", "itemDisabled" and "enabledOnUserRole" tag attributes.