File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes How to style h:dataTable? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "How to style h:dataTable?" Watch "How to style h:dataTable?" New topic

How to style h:dataTable?

Volodymyr Lysenko
Ranch Hand

Joined: Mar 29, 2012
Posts: 511


I am in complete confusion. I can't apply css styles anyway to my h:dataTable:

The issue is no css style is applied to ths table. Even more I can't style
<hutputText id="forumName" class="forumName" value="#{}" />
with class 'forumName'. This text is not styled at all.

How to apply css styles to h:dataTable?

Thank you!

True person is moral, false is right!
Denis Sysoev

Joined: Aug 29, 2012
Posts: 6
Try to check for broken links for css styles in output HTML from this jsf.
Greg Charles

Joined: Oct 01, 2001
Posts: 2967

That looks right to me. What you can do is take a look at the page after it renders use whatever browser tools you have available. (I prefer Firefox with the Firebug plugin.) That will tell you if the classes are being applied at all, and if they are, what styling is being applied.

It's also possible that your browser is caching the style sheet. In that case, a Ctrl-Refresh or Alt-Refresh, depending on the browser, usually forces it to reload.
Volodymyr Lysenko
Ranch Hand

Joined: Mar 29, 2012
Posts: 511


I am ashamed. It was very late yesterday when I did stupid attempts to style my table.
It was new page and I didn't notice that css file for this page was not referenced by hutputScript

Thanks for replies!
I agree. Here's the link:
subject: How to style h:dataTable?
It's not a secret anymore!