-
1. Re: column skinnability with css
fmarwede Dec 19, 2007 6:57 AM (in response to thedrake)Please don't mix up things.
You say, you wanna change style of some columns, not of all. So you shouldn't change the predefined css classes of richfaces components described in the developer guide.
What you really do, is correct, I think: Defining an own style class (hope you load it...) and apply it to a concrete column. Hmm...that should work.
Perhaps you have to post some more code so we can find out what's wrong. -
2. Re: column skinnability with css
thedrake Dec 19, 2007 7:26 AM (in response to thedrake)That's right, I dont want to change de predefined css class of Colum.
I just wanted to change one param, but I don't think it works that way...
My idea was to define a classe with styleClass, only on the wanted colums, like this :<rich:columnGroup> <rich:column> <h:outputText value="#{vehb.vehicule.immat}" /> </rich:column> <rich:column styleClass="sdt_col"> <h:.... ..
and define this sdt_col class. But I don't know if it's the right thing to do, and what to put in this class.. -
3. Re: column skinnability with css
fmarwede Dec 19, 2007 7:34 AM (in response to thedrake)What do you mean: " But I don't know .... what to put in this class.."
Answer: Valid css code. :-)
You had not explicitly answer my question: Do you load your own css file?
Besides I think your way is correct.
What is the official RF team statement? -
4. Re: column skinnability with css
thedrake Dec 19, 2007 7:52 AM (in response to thedrake)I didnt load a css file until now, to do that.
Now i put in the template.xhtml :<link rel="stylesheet" href="/style.css" />
and wanted to change the background of the column in this file like that :
.sdt_col
{
background-color:#FF0000;
}
But it doesnt work, so I maybe I can't do that, or It's not the right parameter.. -
5. Re: column skinnability with css
thedrake Dec 19, 2007 7:54 AM (in response to thedrake)Heh the first quote was disapeared...
There was this line (with < >) :
link rel="stylesheet" href="/style.css" -
6. Re: column skinnability with css
sergeysmirnov Dec 19, 2007 3:12 PM (in response to thedrake)Use CODE not a QUOTE for source code.
In general, "/style.css" looks very strange. What the URL you use to reach the page? -
7. Re: column skinnability with css
thedrake Dec 20, 2007 4:20 AM (in response to thedrake)Priviet sergey.
yeah sorry for the quote, I dont know why I put these :p
You were right...I though I could put /style.css but obviously I cant.
So I changed the path to :#{facesContext.externalContext.request.contextPath}
I found this in another forum, but I don't understand why this works...
This absolute path works for images, so why not css ? -
8. Re: column skinnability with css
sergeysmirnov Dec 20, 2007 12:48 PM (in response to thedrake)if you have an application with name "myapp" and the style sheet is located at the root of the myapp, the path will be:
src="/myapp/style.css"
but not just
src="/style.css"
unless you create an alias for root of the webserver.
If you do not want to add this: #{facesContext.externalContext.request.contextPath}
use:<a4j:loadStyle src="/style.css" />