wood burning stoves 2.0*
The moose likes JSF and the fly likes h:dataTable  color Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "h:dataTable  color" Watch "h:dataTable  color" New topic
Author

h:dataTable color

Matt Hardy
Greenhorn

Joined: Nov 03, 2011
Posts: 18
Dear Experts, I need your help,
how to add colors in my h:datatable? i am using the page .xhtml and is that possible to add colors on dataTable without css.

Thanks.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15657
    
  15

Welcome to the JavaRanch, Matt!

Sorry, you're going to have to use CSS. JSF was designed on the basis that it shouldn't have to duplicate what other systems already did better, and in the matter of formatting displays, "better" is CSS. So there is extensive CSS support in JSF, but very little in the way of brute-force display configuration.


Customer surveys are for companies who didn't pay proper attention to begin with.
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

If you do not want to use a Style css file you could use the filer style and write wharever you want to. But that not a good pratice.


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
Matt Hardy
Greenhorn

Joined: Nov 03, 2011
Posts: 18
@Tim Holloway and @Hebert Coelho

Thank you so much for your help and i guess i should use CSS in my code. i am new to jsf, to move forward i need to learn some basics about this technology. i am about to view values from the database and want to add some colors into the h:dataTable. so could you please explain how to implement css in my .xtml page? shall i create new .css file for that? or suggest me the best sites for that.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: h:dataTable color
 
Similar Threads
WA #2 ..... word association
Adding a caption to h:dataTable
Static Imports
h:dataTable with scroll bars
Datatable with scrollbar in JSF