0

I need to auto display a tooltip on some rows of my datatable , without any event, i've read the that it can be done using Primefaces Extensions, but could not find an example that works. I don't know what value should take the attribute forSelector.

<pe:tooltip value="Click to view More Datails"
forSelector="?" shared="true"
targetPosition="top center" position="left center"
autoShow="true" />
callafa
  • 385
  • 2
  • 6
  • 20

2 Answers2

1

Set autoshow property true

 <pe:tooltip value="AutoShow" autoShow="true"/>

you can bind this property to backingbean value...

 <p:column id="ctipo3" headerText="Estado">                                                        
        <p:commandButton id="estado"/>
         <pe:tooltip id="toolTipTrack4" for="estado" value="#{item.texto}" autoShow="#{item.texto}"/>
 </p:column>
meyquel
  • 2,134
  • 5
  • 23
  • 42
  • Thank you, but i already tested with the `autoShow="true"` and it didn't work in my case (datatable row). – callafa Oct 17 '14 at 10:06
0

To be able to display a tooltip for a row in datatable, here after an exemple:

<pe:tooltip forSelector=".myTable tr[role=row][data-ri=#{rowIndex}]" value="#{project['myfield.tooltip']} #{obj.myfield}"/>

Where:

  • .myTable is a css style applied to the datatable: styleClass="myTable"
  • rowIndex is the row index var defined in datatable: rowIndexVar="rowIndex"

this tooltip is to be added inside a <p:column>.

Note that to be able to use Primefaces Extensions tags, you should add the appropriate xmlns:

xmlns:pe="http://primefaces.org/ui/extensions"
callafa
  • 385
  • 2
  • 6
  • 20