This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

h:dataTable color  RSS feed

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 20318
110
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Matt Hardy
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@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.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!