webtier@glassfish.java.net

JSF 2.0 Resourceloading problem in CSS using outputStyle tag

From: <webtier_at_javadesktop.org>
Date: Tue, 01 Dec 2009 12:01:05 PST

Hi @all!

I'm using Glassfish 2.1.1 with JSF Mojarra 2.0.1 and have the following problem.

I created a [b]composite component[/b] and added the related CSS definition with the new [b]<h:outputStyle>[/b] tag.
The CSS file contains image path definitions, relative to the CSS location. The problem is that no image will be displayed.

Component:
[b]...
<h:outputStylesheet name="components/css/itemList.css"/>
...[/b]

CSS:

[b] .itemList table thead .header {
  text-align: left;
  padding-left: 10px;
  background: #ccccff url(../img/table_sort_none.gif) no-repeat center left;
  cursor: pointer;
}[/b]

After the rendering the image path in CSS looks like this, inspected with firebug:

[b]background: #CCCCFF url(table_sort_none.gif) no-repeat scroll left center[/b]

and the CSS file path:
http://localhost:7302/vc/javax.faces.resource/components/css/itemList.css.faces

I think the problem is the [b]javax.faces.resource[/b] in the CSS path and the automated flatten of the relative image path.

Does anyone knows a solution for this problem, except to use the old style of linking the CSS file? Or is this a bug?

thank you,
florian
[Message sent by forum member 'f_schebelle' ]

http://forums.java.net/jive/thread.jspa?messageID=374152