This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to display text & image in richfaces tab

 
mark weatherill
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you find a solution for this???

RamnathN
 
Venkat Sadasivam
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try

<f:facet name="label">
<h:graphicImage value="closeButton.gif"/> Your Text Here
</f:facet>
 
karthigeyan narayanamurthy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this !!!

<f:facet name="label">
<h:panelGroup>
<h:graphicImage value="closeButton.gif"/>
<hutputLabel value="Your Text Here"></hutputLabel>
</h:panelGroup>
</f:facet>
 
Tom Eller
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try

<h:panelGrid columns="2">
col1
col2
</h:panelGrid>

in your facet.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic