• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

add images and text in rich:tab header

 
Sachin Yewale
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends ,
I want to create a tab like menu in jsf 2.0.
I am using rich:tab for this. but in this component there is attribute label which is used to give name to header,but i want to use both name and icon for the header name. Do any one have idea how to do that?

thanks in advance
Sachin.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That particular component doesn't appear to support images. It may be possible to attach an icon using the "style/styleClass" attribute as a CSS operation, but if that doesn't work, you'll have to find an alternative tabPanel solution.
 
J Miller
Ranch Hand
Posts: 80
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You actually can do this, we do it in our application to add an icon to close that tab. You can put it inside a label facet like this:



You can put whatever you want in the label facet. We have text and an image.
 
Brendan Healey
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I never, useful to know, thanks J Miller.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I kinda knew, since I think I've actually done it. But I'm reluctant to volunteer on stuff in header facets, since the exact content and format of what goes into a facet tends to vary with the tag being faceted.

Anyway, now it's official. Problem Solved!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic