[Logo]
Forums Register Login
How to apply CSS to JSF Datatable
Can anyone help me in changing the default style of the
jsf datatable, <webuijsf:table>???
I guess you're talking about the Woodstock JSF components here. You can use style attribute to apply the CSS, e.g.
hello sir thanks for your reply

even after giving the style unable to change the table layout color
if the style is given for <webuijsf:tableColumn> it affects only the rows and columns, also unable to give different colors for each row.
The last time I tried JSF Woodstock, it also didn't seem to be very CSS friendly, especially with color. It somehow forces you to use its default color. I never like it
for the JSF componenets of sun visual web pack of netbeans there is .css file in which you can override the existing colors and size, so i guess in this case also there has to be some css file..may be in war or somewhere. Other option that i saw over there is that even if there is no css if you create a sylesheet.css file then the components take that.
This is all with respect to jsf components with netbeans
thanks for the response
so there is no way to apply style for <webuijsf:table>, other than
changing the built-in css of netbeans, so i think better to use h:datatable itself.
hello sir,

i used this <webuijsf:table> because pagination can be done very simply in it, now what i need is to apply style for it. But even after using style, the background color is not get affected on the table. Can anyone please help me in coloring a jsf datatable???
Although, I have no experience with wood stock reference implementation, but after reading Freddy's response, I believe you should be able to solve it by compiling one of your own after downloading its source. This way you would be able to contribute to the project as well by submitting your fixes to the project.

Cheers.
Have you already checked RichFaces or MyFaces to see if they are having your desired component? I bet, there you will definitely find something, after all these are two of the leading JSF implementations.
hello sirs,

i have applied style for h:datatable, but since the woodstock components provide pagination i depend on it, but even though pagination was working perfectly i was unable to color the table.
From this forum can i conclude that in woodstock components we cannot apply style sheet according to our need, and for this purpose we have to depend richfaces or myfaces
 
Originally posted by jomol jin:
From this forum can i conclude that in woodstock components we cannot apply style sheet according to our need, and for this purpose we have to depend richfaces or myfaces


Scary, I must say. Well, I would say don't conclude anything like that, try it yourself, download the source code, dig into it, and see where is the problem. After that you will be able to see much more clearer. In fact, Wood Stock implementation is not very popular, and apparently has less users.
http://developers.sun.com/jscreator/learning/tutorials/2/stylesheets_comps.html

It has some pointers
hi pankaj,

i dont why i cant access the link you have posted
am redirected to http://developers.sun.com/jscreator/

any idea???

thanks
Hi, I'm using Tomahawk dataTable and I can say is CSS friendly and also has a paginator.
Sorry, I have no experience with Woodstock JSF components.
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards


This thread has been viewed 7899 times.

All times above are in ranch (not your local) time.
The current ranch time is
Dec 18, 2017 05:33:41.