Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8383493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:10:35+00:00 2026-06-09T17:10:35+00:00

I am using Primefaces 3.2 with jsf 2 and glassfish 3.1.2. I have a

  • 0

I am using Primefaces 3.2 with jsf 2 and glassfish 3.1.2.

I have a p:dataTable of users containing avatars of the user. Whenever the user moves the mouse over the avatar a p:overlayPanel appears with more information (lazy loaded) on the user, and disappears when the user moves the cursor away – like this:

<p:overlayPanel for="avatar" dynamic="true" showEvent="mouseover" hideEvent="mouseout" ...>

This works very well – as long as the user is “slowhanded”. Whenever an user moves the cursor fast above many avatars many of the overlayPanels stay visible.
For example when the user has the cursor over the position where user avatars are displayed and uses the scroll wheel of his mouse to scroll the usertable down or up.

I believe that the overlaypanel starts to load the information dynamically (dynamic="true") from the server when showEvent="mouseover" is dispatched and displays the overlaypanel after the response from the server arrives.
This way it is not possible to detect whether the cursor is already away when the overlaypanel becomes visible – so the hideEvent="mouseout" is never dispatched.

Is there a way to make the primefaces overlaypanel appear directly on mousover, showing a loading gif and update the content into the overlaypanel when the response comes from the server.

Is this a good appraoch or does anyone know any other way to solve this nasty problem?

Thanks Pete

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:10:36+00:00Added an answer on June 9, 2026 at 5:10 pm

    As my first answer is already very long and contains valid information, I decided to open a new answer presenting my final approach.

    Im now using Primefaces inheritance pattern making the code alot cleaner. Also I noticed that replacing/overwriting the whole bindEvents function isnt necessary, as we can remove the old event handlers. Finally this code fixs the latest issue experienced: A hide event before ajax arrival.

    PrimeFaces.widget.OverlayPanel = PrimeFaces.widget.OverlayPanel
            .extend({
    
                bindEvents : function() {
                    this._super();
    
                    var showEvent = this.cfg.showEvent + '.ui-overlay', hideEvent = this.cfg.hideEvent
                            + '.ui-overlay';
    
                    $(document).off(showEvent + ' ' + hideEvent, this.targetId).on(
                            showEvent, this.targetId, this, function(e) {
                                var _self = e.data;
    
                                clearTimeout(_self.timer);
                                _self.timer = setTimeout(function() {
                                    _self.hidden = false;
                                    _self.show();
                                }, 300);
                            }).on(hideEvent, this.targetId, this, function(e) {
                        var _self = e.data;
    
                        clearTimeout(_self.timer);
                        _self.hidden = true;
                        _self.hide();
    
                    });
                },
    
                _show : function() {
                    if (!this.cfg.dynamic || !this.hidden) {
                        this._super();
                    }
                }
    
            });
    

    Im sorry for the poor formatting: Eclipses fault 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using PrimeFaces 3.2 with JSF 2 in a glassfish 3.1.2. I have
I have an application developed using Primefaces 2.2.1 and JSF 2.0, deployed on Glassfish
I'm using JSF 2 and PrimeFaces 2.1 on GlassFish. I have a page that
I recently migrated my JSF app(using primefaces) from glassfish 3.1 to tomcat7 server. Previously
I'm using Primefaces 3.3.1 and have question. I have p:commandButton inside p:column of p:dataTable.
I tried this example using Primefaces-3.3.1, JSF 2.1, Glassfish 3.1.2 and IntelliJ IDEA 11.1.3
I am using primefaces with JSF. I need a input component that allows users
Hi there Im just learning JSF 2 using Primefaces. I have a question regarding
I am trying to create a datatable using JSF primefaces. I know there is
I am using JSF 2.0 and PrimeFaces 2.2.1. In my template.xhtml, I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.