myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kito D. Mann (JIRA)" <myfaces-...@incubator.apache.org>
Subject [jira] Created: (MYFACES-173) HtmlJSCookMenuRenderershould support new themes
Date Thu, 07 Apr 2005 01:40:16 GMT
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


Mime
View raw message