This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to style h:dataTable?" Watch "How to style h:dataTable?" New topic
Author

How to style h:dataTable?

Volodymyr Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 505
    
    1

Hello!

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="#{forum.name}" />
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
Greenhorn

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

Joined: Oct 01, 2001
Posts: 2833
    
  11

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 Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 505
    
    1

Hello!

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!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to style h:dataTable?
 
Similar Threads
h:datatable, how multiply row cell A with row cell B and set value in row cell C
how to select a row datatable
datatable - row colors
Passing parameters with h: link
Fixed header scroll bar to datatable