Hey guys, I thought posted this on the Facelets list thinking this was a
Facelets issue, but considering the browser output below, perhaps a
Tomahawk person could comment.  Is anyone else having a problem using
stylesheets with Facelets templates?  I have a template file,
template.xhtml that simply defines my layout using <ui:insert
name="xyz"/>, and at the top of the file I have the snippet listed
below.  My initial page looks great, but when I navigate to another page
in which only the body changes, the header and footer do not continue to
use the stylesheet.  

 

Could someone please explain to me what I might be doing wrong?  This
problem only occurs with Firefox, both versions 1.5 and 2.0; in IE 6.x
the stylesheet is used on all pages as expected.  I only seem to have
this problem when I use Facelets, but the default MyFaces stylesheet
being returned in Firefox seems odd.  As you can see, defaultStyles.css
is replacing my project's stylesheet.  I am running this on Glassfish v2
build 23 (problem happens with Tomcat and other versions of Glassfish as
well).  

 

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml";

      xmlns:ui="http://java.sun.com/jsf/facelets";

      xmlns:f="http://java.sun.com/jsf/core";

      xmlns:h="http://java.sun.com/jsf/html";

      xmlns:c="http://java.sun.com/jstl/core";

      xmlns:t="http://myfaces.apache.org/tomahawk";>

 

    <f:view locale="#{facesContext.externalContext.request.locale}">    

        <head>

            <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />

            <title>#{msg.project_name}: #{msg.project_long_name}</title>

            <link
href="#{facesContext.externalContext.request.contextPath}/resources/styl
es.css" rel="stylesheet" type="text/css" />            

            <f:loadBundle basename="com.lmco.gems.resources.global"
var="msg" />

            

        </head>

 

 

This is what my browser gets using Firefox:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"; >
<html xmlns="http://www.w3.org/1999/xhtml";>    
        <head>
<link rel="stylesheet"
href="/MyProject/faces/myFacesExtensionResource/org.apache.myfaces.rende
rkit.html.util.MyFacesResourceLoader/11646488/tabbedpane.HtmlTabbedPaneR
enderer/defaultStyles.css" type="text/css" />
<script type="text/javascript"
src="/MyProject/faces/myFacesExtensionResource/org.apache.myfaces.render
kit.html.util.MyFacesResourceLoader/11646488/tabbedpane.HtmlTabbedPaneRe
nderer/dynamicTabs.js"><!--
 
//--></script>
<style rel="stylesheet" type="text/css"><!--
#j_id76_j_id79 .myFaces_panelTabbedPane_activeHeaderCell input,
#j_id76_j_id79 .myFaces_panelTabbedPane_pane,
#j_id76_j_id79 .myFaces_panelTabbedPane_subHeaderCell{
background-color:#FFFFCC;
}
 
--></style>

 

 

This is what my browser gets using IE 6.x:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"; >

<html xmlns="http://www.w3.org/1999/xhtml";>    

        <head>

<link rel="stylesheet"
href="/MyProject/faces/myFacesExtensionResource/org.apache.myfaces.rende
rkit.html.util.MyFacesResourceLoader/11646488/tabbedpane.HtmlTabbedPaneR
enderer/defaultStyles.css" type="text/css" />

<script type="text/javascript"
src="/MyProject/faces/myFacesExtensionResource/org.apache.myfaces.render
kit.html.util.MyFacesResourceLoader/11646488/tabbedpane.HtmlTabbedPaneRe
nderer/dynamicTabs.js"><!--

 

//--></script>

<style rel="stylesheet" type="text/css"><!--

#j_id76_j_id79 .myFaces_panelTabbedPane_activeHeaderCell input,

#j_id76_j_id79 .myFaces_panelTabbedPane_pane,

#j_id76_j_id79 .myFaces_panelTabbedPane_subHeaderCell{

background-color:#FFFFCC;

}

 

--></style>

 

 

 

TR

 

Reply via email to