2012-04-05 36 views
0

我們正在實現datatable上的primefaces工具提示。 但工具提示發佈是遠離datable行。Primefaces工具提示定位在數據表中

<p:tooltip targetPosition="bottomLeft" Delay="0" showDelay="0"> 
<h:outputText value="#{label.lockTime}" 
style="font-weight:bold" /> 
<h:outputText value=": #{cert.lockTime}" /> 
<p:spacer width="1" height="10" /> 
<h:outputText value="#{cert.label} " style="font-weight:bold" /> 
<h:outputText value=": #{cert.userDetails}" /> 
</p:tooltip> 
+0

目前Primefaces數據表中不支持工具提示。我相信Primefaces擴展項目有一個dataTable功能的工具提示組件,或者你可以看看這個問題,並實施overlaypanel黑客代替,http://stackoverflow.com/questions/9980155/jsf-2-0-primefaces-2x -tooltip-for-datatable-row – 2012-04-05 12:18:32

+0

@maple_shaft謝謝 – Vish 2012-04-05 13:36:04

回答

1

你試試這個

<p:tooltip /> 
<p:dataTable var="var" ........> 
    <p:column headerText="Market" > 
     <h:outputText value=" #{var.market}" title=" #{var.market}" 
         style="display:block;"> 
     </h:outputText>    
    </p:column> 
    <p:column headerText="Value" > 
     <h:outputText value=" #{var.value}" title=" #{var.value}" 
         style="display:block;"> 
     </h:outputText>    
    </p:column> 

</p:dataTable> 

我希望它將工作。