[英]Primefaces tooltip for a datatable row
我需要在数据表的某些行上自动显示工具提示,没有任何事件,我已经阅读到可以使用Primefaces Extensions完成操作,但是找不到有效的示例。 我不知道什么值应采用forSelector属性。
<pe:tooltip value="Click to view More Datails"
forSelector="?" shared="true"
targetPosition="top center" position="left center"
autoShow="true" />
将自动显示属性设置为true
<pe:tooltip value="AutoShow" autoShow="true"/>
您可以将此属性绑定到backingbean值...
<p:column id="ctipo3" headerText="Estado">
<p:commandButton id="estado"/>
<pe:tooltip id="toolTipTrack4" for="estado" value="#{item.texto}" autoShow="#{item.texto}"/>
</p:column>
为了能够在数据表中显示一行的工具提示,例如:
<pe:tooltip forSelector=".myTable tr[role=row][data-ri=#{rowIndex}]" value="#{project['myfield.tooltip']} #{obj.myfield}"/>
哪里:
styleClass="myTable"
rowIndexVar="rowIndex"
该工具提示将添加到<p:column>
。
请注意,要能够使用Primefaces Extensions标记,应添加适当的xmlns:
xmlns:pe="http://primefaces.org/ui/extensions"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.