Show text while hovering on autocomplete

Asked

Viewed 177 times

1

I have the following autocomplete:

<p:autoComplete id="meuId"
            label="#{messages['mesage']}:"
            completeMethod="#{metodo}" var="bean"
            itemValue="#{bean.id}" itemLabel="#{bean.descritivo}" dropdown="true"
            converter="xx"
            required="false">

How do I make sure that when hovering over the component an informative message is displayed ?

  • You can do both with Javascript like https://api.jquery.com/mouseover/ or with css http://www.w3schools.com/cssref/tryit.asp?filename=trycss_sel_hover

1 answer

1

Can you try the Tooltip of the Primefaces:

<p:autoComplete id="meuId"
        label="#{messages['mesage']}:"
        completeMethod="#{metodo}" var="bean"
        itemValue="#{bean.id}"
        itemLabel="#{bean.descritivo}"
        dropdown="true"
        converter="xx"
        required="false" />
<p:tooltip id="tipMeuId" for="meuId" value="Mensagem a exibir" position="top"/>

It is super simple to use and has several customization options

Browser other questions tagged

You are not signed in. Login or sign up in order to post.