[ 
https://issues.apache.org/jira/browse/TOMAHAWK-1341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634597#action_12634597
 ] 

Joseph ONeil commented on TOMAHAWK-1341:
----------------------------------------

I found what I think is the problem this component underwent a lot of changes 
originally in 1.1.6  without going into details
The setproperties method in HtmlJSCookMenuTag does not set the 
JSFAttr.STYLE_LOCATION attribute as is done in This was orignally handle in the
UIComponentTagBase in 1.1.6 which is no longer use in 1.1.7  This problem looks 
like it may extend to some of the other attributes that also are not handled in 
the HtmlJSCookMenuTag
I change the  protected void setProperties(UIComponent component) method as 
follows

  if (_styleLocation != null)
        {
             comp.setValueExpression("styleLocation", _styleLocation);
//<----Begin new code----->
              if (_styleLocation != null) setStringProperty(component, 
JSFAttr.STYLE_LOCATION, _styleLocation);
     //<---End new Code--->

        }
I also added a new method
 protected void setStringProperty(UIComponent component, String propName, 
ValueExpression value)
    {
        UIComponentELTagUtils.setStringProperty( component, propName, value);
    }

I will attach the comple file also

> JS Cook Menu stylelocation no longer working on 1.1.7
> -----------------------------------------------------
>
>                 Key: TOMAHAWK-1341
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1341
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: JS Cook Menu
>    Affects Versions: 1.1.7
>         Environment: window Jboss Java 5 and tomahawk 1.1.7 for 1.2 jsf
>            Reporter: Joseph ONeil
>
> The stylelocation in 1.16 allow me to set custom color to the menu this is no 
> longer and instead showing the default color
> <t:jscookMenu layout="hbr" theme="ThemeOffice" 
> styleLocation="/css/jscookmenu" >
> .....
> </t:jscookMenu>
>  Looking at the html source you can see how the href is being created note 
> Trade is the application name
> version 1.1.6 (Link is correct)
> link rel="stylesheet" href="/Trade/css/jscookmenu/ThemeOffice/theme.css" 
> type="text/css" />
> version .1.17
> <link rel="stylesheet" 
> href="/Trade/faces/extensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12222884/navmenu.jscookmenu.HtmlJSCookMenuRenderer/ThemeOffice/theme.css"
>  type="text/css" />

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to