| Author |
How to display text & image in richfaces tab
|
mark weatherill
Greenhorn
Joined: Jan 21, 2006
Posts: 6
|
|
Folks I would like to include both a text label and image of a close button in the header of a richfaces tab component. I have tried including a <f:facet name="label"> <h:graphicImage value="closeButton.gif"/> </f:facet> in the <rich:tab> tag which also has a label attribute, but only the image data gets displayed, not both. Could someone please suggest a way to include both text and image in a richfaces tab component? Thanks, Mark Weatherill.
|
 |
Ramnath Natarajan
Greenhorn
Joined: Mar 01, 2005
Posts: 10
|
|
Did you find a solution for this??? RamnathN
|
 |
Venkat Sadasivam
Ranch Hand
Joined: May 10, 2008
Posts: 139
|
|
Try <f:facet name="label"> <h:graphicImage value="closeButton.gif"/> Your Text Here </f:facet>
|
“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
|
 |
karthigeyan narayanamurthy
Greenhorn
Joined: Jun 18, 2008
Posts: 1
|
|
Try this !!! <f:facet name="label"> <h:panelGroup> <h:graphicImage value="closeButton.gif"/> <h utputLabel value="Your Text Here"></h utputLabel> </h:panelGroup> </f:facet>
|
 |
Tom Eller
Greenhorn
Joined: Jun 24, 2008
Posts: 1
|
|
I tried the panelGroup approach and still get neither text nor image in the tab. Is this a "newer" feature perhaps? I only have RichFaces 3.0.0. (Tomcat 6.0.16, JDK 1.5.0_15, JSF 1.2_04-b07)
|
 |
mark louis
Greenhorn
Joined: Nov 10, 2009
Posts: 1
|
|
try
<h:panelGrid columns="2">
col1
col2
</h:panelGrid>
in your facet.
|
 |
William P O'Sullivan
Ranch Hand
Joined: Mar 28, 2012
Posts: 860
|
|
Not sure if 3, changed but in Richfaces 4, "label" was changed to "header".
I was able to get this to work using richfaces 4.2.2 final!
WP
|
 |
J Miller
Ranch Hand
Joined: Oct 21, 2010
Posts: 62
|
|
I actually answered almost this exact same question yesterday on this post:
http://www.coderanch.com/t/584029/JSF/java/add-images-text-rich-tab
You can do exactly what I said there, but also put an outputText in the label facet. This is how we're currently doing this in my project. The code sample I provided was for Richfaces 3.3.3, so it may have changed in 4 as William said. Same principle should work though.
|
 |
 |
|
|
subject: How to display text & image in richfaces tab
|
|
|