Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Display the content of a variable without <h:outputText>?

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

At this moment, I use <h: outputText value="#{bean.informations}", in this variable I have some HTML code with all informations to display. But now, I need to include some <rich:tooltip>" but if I put in my variable "<rich:tooltip ...>" with <h: outputText> it doesn't work.

There is another way to display that without outputText? (is it simply possible?)

I display my informations like this:


My "informations" contains:


And I would like to display



Thanks in advance!
 
Saloon Keeper
Posts: 25466
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tooltips are intended to provide hints on how to use input controls. That's why they don't work on outputText. You can, however, attach a CSS hover pop-up to the outputText the same way you with with straight HTML.

Speaking of straight HTML, I don't recommend mixing raw HTML and JSF. However, in the case of "span" tags around outputText, it's not merely not recommended, it's actually redundant. The outputText HTML renderer places span around the text so that it will have a place to put the style/styleClass values that were coded on the outputText tag.
 
Fabian Angy
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In fact, I need to use rich:tooltip because my informations comes from webservices, in waiting the retrieving of informations, i need to have a message (by example "webservice is calling") and when the webservice returns the information, the value of the tooltip have to change. So, I can't do that with a simple CSS.
 
Tim Holloway
Saloon Keeper
Posts: 25466
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Fabian Angy wrote:In fact, I need to use rich:tooltip because my informations comes from webservices, in waiting the retrieving of informations, i need to have a message (by example "webservice is calling") and when the webservice returns the information, the value of the tooltip have to change. So, I can't do that with a simple CSS.



Actually, you can. Put the text in a floating div element and use JavaScript to populate it with the text from the web service. Then attach "hover" javascript to the outputText element that positions the div and makes it visible/invisible. It's not that uncommon.

However, for best results, "tooltip" isn't a good search term, since a tooltip is - like I said - literally a tip on how to use an (input) tool (control). You'll probably get better results searching for "hover text".
 
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic