Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JSF: tomahawk dataTable rowStyleClass problem while applying alternate colors to rows

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to apply alternate colors to rows in a tomahawk dataTable, but I cannot get it to work.
Any help will be greatly appreciated.

Versions used :
tomahawk- 1.1.8
myfaces- 11-1.0.0

jsp Code:
<t:dataTable id="data" headerClass="cell-scrollable-header"
footerClass="standardTable_Header"
rowClasses="OddRow,EvenRow"
border="0" var="user" renderedIfEmpty="false"
value="#{MyBackingBean.resultList}"
preserveDataModel="false" rows="10">

Css :

tr.OddRow{
background-color: cyan;
width: 250px;

}

tr.EvenRow{
background-color: red;
width: 250px;

}

If I see the output background colors are not applied to rows.

But in view source I can see the odd rows are taking styleclass OddRow and even rows are taking EvenRow.


I do not know why the background color is not applying.

Your help is greatly expected.

Thanks,
Vennila

 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your CSS is not been picked up by the webbrowser.

Is it inline in the HTML head or in an external file?

If inline, then you have a serious problem. If external file, then its URL is likely wrong.
 
vennila Selvaraj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bauke,

Thanks for the reply.

Css is from external file.
But I think the URL of the CSS file is picked by the web browser as the other styles given in that external file is picked and working correctly.

Please suggest.

Thanks,
Vennila

 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you recently changed the CSS, then you should do a hard refresh in your webbrowser. Use CTRL+F5 or so. It may still be cached by the webbrowser. Particularly MSIE is known about this.

If not done yet, do an appserver restart as well.
 
vennila Selvaraj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Yes, I did ctrl+F5, cleared my browser cache, restared my tomcat then also it is not working.

I am able to see the style changes - "background-color" as red for evenrow and cyan for oddrow in IE Developer Toolbar.
But the color is not getting affected.

Is there any limitation because of the version tomahawk- 1.1.8 and myfaces- 11-1.0.0 used ?
Please tell me how it can be resolved.

 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it's a client side problem. Your CSS is not been picked up or it is been overridden by another styles. Verify your CSS file. To start, try removing or outcommeting everything in the CSS file expect of those two styles. Also remove or outcomment any other CSS files which gets loaded.
 
vennila Selvaraj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Yes, css style for row is overridden by css style for column.

Thanks and cheers ,
Vennila
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic