0 Replies Latest reply on May 4, 2007 5:57 PM by Al Sahin

    Stylesheets are loaded twice

    Al Sahin Newbie

      I have the following problem. When my page is loaded first time I can see with a DOM viewer that all Rich Faces styles are loaded twice. Once with a jsessionid=... token and the second time without the jsessionid as following:

      <link href="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/css/panel.xcss/DATA/eAFbJaehBAADeAET;jsessionid=03E30C094E6158731419BB5AD546B733" type="text/css" rel="stylesheet"><link href="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/css/toolBar.xcss/DATA/eAFbJaehBAADeAET;jsessionid=03E30C094E6158731419BB5AD546B733" type="text/css" rel="stylesheet">
      </link>
      <link href="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/css/spacer.xcss/DATA/eAFbJaehBAADeAET;jsessionid=03E30C094E6158731419BB5AD546B733" type="text/css" rel="stylesheet">
      </link>
      <link href="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/css/simpleTogglePanel.xcss/DATA/eAFbJaehBAADeAET;jsessionid=03E30C094E6158731419BB5AD546B733" type="text/css" rel="stylesheet">
      </link>
      <script src="/carsweb/faces/a4j.res/org.ajax4jsf.framework.ajax.AjaxScript" type="text/javascript">
      </script>
      <script src="/carsweb/faces/a4j.res/prototype.js" type="text/javascript">
      </script>
      <script src="/carsweb/faces/a4j.res/org.ajax4jsf.framework.ajax.ImageCacheScript" type="text/javascript">
      </script>
      <script src="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/scripts/browser_info.js" type="text/javascript">
      </script>
      <script src="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/scripts/simpleTogglePanel.js" type="text/javascript">
      </script>
      <style type="text/css">
      </style>
      <style media="screen" type="text/css">
      </style>
      <style media="print" type="text/css">
      </style>
      <link href="/carsweb/css/styles.css" type="text/css" rel="stylesheet">
      </link>
      <link href="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/css/panel.xcss/DATA/eAFbJaehBAADeAET" type="text/css" rel="stylesheet">
      </link>
      <link href="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/css/toolBar.xcss/DATA/eAFbJaehBAADeAET" type="text/css" rel="stylesheet">
      </link>
      <link href="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/css/spacer.xcss/DATA/eAFbJaehBAADeAET" type="text/css" rel="stylesheet">
      </link>
      <link href="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/css/simpleTogglePanel.xcss/DATA/eAFbJaehBAADeAET" type="text/css" rel="stylesheet">
      </link>
      



      When I refresh the page, then the page is loaded with only one set of Rich Faces stylesheets. And the head element looks like this:

      <link href="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/css/panel.xcss/DATA/eAFbJaehBAADeAET" type="text/css" rel="stylesheet">
      </link>
      <link href="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/css/toolBar.xcss/DATA/eAFbJaehBAADeAET" type="text/css" rel="stylesheet">
      </link>
      <link href="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/css/spacer.xcss/DATA/eAFbJaehBAADeAET" type="text/css" rel="stylesheet">
      </link>
      <link href="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/css/simpleTogglePanel.xcss/DATA/eAFbJaehBAADeAET" type="text/css" rel="stylesheet">
      </link>
      <script src="/carsweb/faces/a4j.res/org.ajax4jsf.framework.ajax.AjaxScript" type="text/javascript">
      </script>
      <script src="/carsweb/faces/a4j.res/prototype.js" type="text/javascript">
      </script>
      <script src="/carsweb/faces/a4j.res/org.ajax4jsf.framework.ajax.ImageCacheScript" type="text/javascript">
      </script>
      <script src="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/scripts/browser_info.js" type="text/javascript">
      </script>
      <script src="/carsweb/faces/a4j.res/org/richfaces/renderkit/html/scripts/simpleTogglePanel.js" type="text/javascript">
      </script>
      <style media="screen" type="text/css">
      </style>
      <style media="print" type="text/css">
      </style>
      <link href="/carsweb/css/styles.css" type="text/css" rel="stylesheet">
      


      This happens consistently when a new browser window is open. This causes problems with my custom defined styles being overwritten when they are used in the bodyClass attribute of the Rich Panel component.