Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Dynamic CSS

843844Jun 3 2008 — edited Jun 5 2008
Hi All,

I hope this is simple, but what I would like to do is to include a css file, but have the FacesServlet do it's magic on it first.

Let's say I have this line right now (which in fact, I do):

<link rel="stylesheet" type="text/css" href="main.css"/>

I would like to have something like this line here:

<link rel="stylesheet" type="text/css" href="main.csf"/>

Where csf would be interpretted as jsf initially, but returned as a .css.

That way I could have lines that specify font, for instance, and have that font be dynamically substituted for dynamically:

/* text and font styles */
.pfNormalText {
font-size: 8pt;
font-family: ${myFontVariableName};
margin: 0px;
padding: 0px;
color: rgb(0, 0, 0);

I read in another forum, or perhaps this one, that a custom filter could be employed, but I don't know how to set this up. If someone knows how, I would appreciate a helping hand.

Thanks,

Scott
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 3 2008
Added on Jun 3 2008
4 comments
210 views