Page 1 of 1

pe:Tooltip perofrmance problem

Posted: 28 Jun 2012, 08:46
by MirekSz2
Hello,
I use cool tooltip like this

<pe:tooltip for="#{id}Field" targetPosition="top center" position="bottom center" forSelector=".ui-state-error"><h:message for="#{id}Field"/></pe:tooltip>

its mean that I show my users validations error on field.
But when I enter on page and dont have any walidations error I got on my browser console many warnings like this

qTip2: Unable to locate content for tooltip! Aborting render of tooltip on element: [input#mainForm:mainFormPanel:firstNameField.ui-inputfield]
toolti...v=0.5.1 (wiersz 60)
qTip2: Unable to locate content for tooltip! Aborting render of tooltip on element: [input#mainForm:mainFormPanel:lastNameField.ui-inputfield]
toolti...v=0.5.1 (wiersz 60)
qTip2: Unable to locate content for tooltip! Aborting render of tooltip on element: [input#mainForm:mainFormPanel:personFunctionField.ui-inputfield]
toolti...v=0.5.1 (wiersz 60)
qTip2: Unable to locate content for tooltip! Aborting render of tooltip on element: [input#mainForm:mainFormPanel:emailField.ui-inputfield]
toolti...v=0.5.1 (wiersz 60)
qTip2: Unable to locate content for tooltip! Aborting render of tooltip on element: [input#mainForm:mainFormPanel:phoneField.ui-inputfield]
toolti...v=0.5.1 (wiersz 60)
qTip2: Unable to locate content for tooltip! Aborting render of tooltip on element: [textarea#mainForm:mainFormPanel:notesField.ui-inputfield]


Which slow down my page rendering

Re: pe:Tooltip perofrmance problem

Posted: 28 Jun 2012, 10:36
by Oleg
Hi

Code: Select all

<pe:tooltip for="#{id}Field" targetPosition="top center" position="bottom center" forSelector=".ui-state-error">
    <h:message for="#{id}Field"/>
</pe:tooltip>
is a strange construct. If no messages available, the content of tooltip is empty and that makes problem. Messages should placed outside of pe:tooltip and you should use tooltip's global="true" flag.

Would you like to show messages in tooltips? Can this post help you?