Disabled Flag in NavigationMenuItem masking disabled flag in SelectItem
-----------------------------------------------------------------------

         Key: TOMAHAWK-443
         URL: http://issues.apache.org/jira/browse/TOMAHAWK-443
     Project: MyFaces Tomahawk
        Type: Bug

  Components: NavigationMenuItem  
    Versions: 1.1.2    
 Environment: Windows XP Pro 2002 SP2, WebLogic 8.1 SP4 (running on BEA JDK 
1.4.1_05)
    Reporter: Mark Rohan
    Priority: Critical


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to