2012-10-04 44 views
0

其中一個表列顯示其行中的commandLink,其值爲長文本。我僅顯示該文本的一部分,並且當用戶將鼠標懸停在鏈接上時,我想要彈出窗口或顯示全文並在鼠標不在時將其隱藏的內容。 我將如何處理這個問題,嘗試ajax事件,但沒有奏效。 其 感謝顯示鼠標懸停或懸停在<p:commandLink>上的全文

回答

0

如果你想知道,這是我做的最後使用提示...

<div id="sub" style="width:175px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;"> 

      <p:commandLink id ="myLink" value="#{message.subject}" ajax="true" 
          update=":messageForm:grid"> 
       <f:setPropertyActionListener value="#{message}" 
              target="#{myBean.selectedMessage}"/> 

      </p:commandLink> 

      <p:tooltip for="myLink" value="#{message.subject}" showEffect="slide" hideEffect="slide" style="background-color:#FFFFCC;border:1px dotted #000000;" /> 
     </div>