You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Kito D. Mann (JIRA)" <my...@incubator.apache.org> on 2005/04/07 03:40:16 UTC

[jira] Created: (MYFACES-173) HtmlJSCookMenuRenderershould support new themes

HtmlJSCookMenuRenderershould support new themes
-----------------------------------------------

         Key: MYFACES-173
         URL: http://issues.apache.org/jira/browse/MYFACES-173
     Project: MyFaces
        Type: New Feature
    Versions: 1.0.9 beta    
 Environment: Tomcat 5, Windows XP, 1.09RC2
    Reporter: Kito D. Mann


The HtmlJSCookMenuRenderer should allow user-defined themes in the auto-generated JavaScript. Ideally, you should be able to pick any theme name and specify a path. For example,

<x:jscookMenu layout="hbr" theme="ThemeCustom" path="/themes">
  ...
</x:jscookMenu>    

The path property should be treated as relative to the context root. This would generated JavaScript like the following:

<link rel="stylesheet" type="text/css" 
  href="/webapp/themes/ThemeCustom/theme.css"/>
<script src="/webapp/themes/ThemeCustom/theme.js" 
  type="text/javascript"></script>

As a workaround, you can specify the stylesheet and script in your view: 

<x:stylesheet path="/themes/ThemeCustom/theme.css"/>
<f:verbatim escape="false">
  <script src="/webapp/themes/ThemeCustom/theme.js" 
     type="text/javascript"></script>
</f:verbatim>
<x:jscookMenu layout="hbr" theme="ThemeCustom">
...
</x:jscookMenu>

On a related note, does the renderer really need to generate references for _all_ of the themes if only one of them is being used?


-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira