aspose file tools*
The moose likes JSF and the fly likes add images and text in rich:tab header Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "add images and text in rich:tab header" Watch "add images and text in rich:tab header" New topic
Author

add images and text in rich:tab header

Sachin Yewale
Greenhorn

Joined: Feb 02, 2012
Posts: 21
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

Joined: Jun 25, 2001
Posts: 16140
    
  21

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.


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

Joined: Oct 21, 2010
Posts: 67
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

Joined: May 12, 2009
Posts: 218
Well I never, useful to know, thanks J Miller.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16140
    
  21

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!
 
 
subject: add images and text in rich:tab header