-
1. Re: Single rich:toolTip for multiple components [question]
ilya_shaikovsky Jan 11, 2010 10:08 AM (in response to abhishek_n)1 of 1 people found this helpful<script type="text/javascript"> function showTT(event, text){ #{rich:element('shtt')}.innerHTML=text; #{rich:component('shared_tooltip')}.show(event,{}); } </script> <rich:toolTip id="shared_tooltip" attached="false"> <h:outputText id="shtt"/> </rich:toolTip> <rich:dataTable value="#{toolTipData.vehicles}" width="400" var="vehicle" rowKeyVar="row" onRowClick="showTT(event, '#{vehicle.make}')">
that works for me. unfortunatelly tooltip not supports dynamical substitutions like drag indicator or calendar. Thats why you have to insert content on your own to tooltip shared instance.
-
2. Re: Single rich:toolTip for multiple components [question]
abhishek_n Jan 15, 2010 5:01 AM (in response to ilya_shaikovsky)Not working.
funtion call to JS is going.
This line is getting executed.#{rich:element('shtt')}.innerHTML=text;
But in the next line,
show(event,{}); is not getting executed.
In the generated html, the 2nd line is generated as
document.getElementById('shared_tooltip').component.show(event,{});
If I add javascript alert
alert( document.getElementById('shared_tooltip').component) is giving object Object in alert box
but, alert( document.getElementById('shared_tooltip').component.show(event,{}); is not giving any alert.
I am using Firefox browser.
-
3. Re: Single rich:toolTip for multiple components [question]
nbelaevski Jan 15, 2010 6:47 AM (in response to abhishek_n)Check if there are any JS errors. -
4. Re: Single rich:toolTip for multiple components [question]
abhishek_n Jan 15, 2010 7:30 AM (in response to nbelaevski)yes. getting JS error Object required.