Eric C.
Eric C.

Reputation: 3368

p:tooltip for items of p:pickList

I'm struggling to use a primefaces p:tooltip for items of a p:pickList.

I have a pickList defined as:

<p:pickList id="stepPickList" 
            value="#{activityBean.stepDualListModel}"
            var="step"
            showSourceFilter="true" 
            showTargetFilter="true" 
            filterMatchMode="contains"
            itemLabel="#{step}" 
            itemValue="#{step}"
            addAllLabel="#{messages.label_addAll}"
            addLabel="#{messages.label_add}"
            removeAllLabel="#{messages.label_removeAll}"
            removeLabel="#{messages.label_remove}"
            moveBottomLabel="#{messages.label_moveBottom}"
            moveDownLabel="#{messages.label_moveDown}"
            moveTopLabel="#{messages.label_moveTop}"
            moveUpLabel="#{messages.label_moveUp}"
            showTargetControls="true">

    <o:converter converterId="omnifaces.ListConverter" list="#{activityBean.stepSource}"/>

    <f:facet name="sourceCaption"> #{messages.step_list}</f:facet>  
    <f:facet name="targetCaption"> #{messages.label_stepList}</f:facet>

    <p:column style="width:100%;">  
        <h:outputText id="nameID" value="#{step.name}" /> 
        <p:tooltip for="nameID" value="#{step.description}" />
    </p:column>
</p:pickList>

This seems to show all tooltips for each item when mouse over the first element only... I tried with primefaces extension's tooltip pe:tooltip and I get weird behavior too...

So, first of all, can a tooltip be used on h:outputText? If not, what kind of component should I use? (I tried with h:outputLink as seen in many examples on primefaces and pe showcases and still not the desired effect)

thanks for any hints !!

Upvotes: 0

Views: 1991

Answers (1)

user3092514
user3092514

Reputation: 61

It's difficult to replicate your error without the backing bean code, but have you tried

<p:column>  
    <h:outputText value="#{step.name}" title="#{step.description}" /> 
</p:column>

?

Upvotes: 1

Related Questions