Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

PopupButton component

Henri Kerola
1 decade ago Feb 18, 2010 3:13pm
Henri Muurimaa
1 decade ago Feb 18, 2010 6:38pm
Henri Kerola
1 decade ago Mar 12, 2010 12:57pm
Xavier Pan
1 decade ago Mar 31, 2010 3:11am
Henri Kerola
1 decade ago Mar 31, 2010 11:56am
Joonas Lehtinen
1 decade ago Jul 30, 2010 8:03am
Henri Kerola
1 decade ago Jul 30, 2010 8:29am
Joonas Lehtinen
1 decade ago Jul 30, 2010 8:46am
Fabrice Daugan
1 decade ago Dec 12, 2010 5:59pm
Henri Kerola
1 decade ago Dec 22, 2010 9:38pm
Martin Söderström
1 decade ago Jul 06, 2011 7:47am
Henri Kerola
1 decade ago Jul 07, 2011 12:20pm
Phoenix Clearwater
1 decade ago Jul 14, 2011 10:34pm
Henri Kerola
1 decade ago Aug 15, 2011 8:06am
Jan Habeck
1 decade ago Aug 15, 2011 2:11pm
Henri Kerola
1 decade ago Aug 16, 2011 6:34am
Max Santalahti
1 decade ago Aug 29, 2011 4:55am
Henri Kerola
1 decade ago Aug 29, 2011 8:19am
Aljosa Klisanic
10 years ago Nov 03, 2011 2:02pm
Chun W
10 years ago Dec 02, 2011 5:38pm
Henri Kerola
10 years ago Dec 08, 2011 2:44pm
Anatoly Shirokov
10 years ago Dec 16, 2011 9:17am
Marko Sormunen
10 years ago Jan 31, 2012 8:39am
Henri Kerola
10 years ago Feb 02, 2012 8:50am
Blagovest Bashev
10 years ago Apr 02, 2012 2:47pm
Henri Kerola
10 years ago Apr 03, 2012 4:16pm
Blagovest Bashev
10 years ago Apr 03, 2012 9:38pm
Blagovest Bashev
10 years ago Apr 04, 2012 10:18am

I was able to solve the problem by adding a PopupVisibilityListener and within it I call event.getPopupButton().requestRepaintAll();

popup.addPopupVisibilityListener(new PopupVisibilityListener()
        {
            
            public void popupVisibilityChange(PopupVisibilityEvent event)
            {
                if(event.isPopupVisible())
                {
                    event.getPopupButton().requestRepaintAll();
                }
            }
        });

Regards,
Blagovest

Alecs Farca
10 years ago Apr 11, 2012 2:15pm
Guy Brush
9 years ago Apr 27, 2012 9:12am
Henri Kerola
9 years ago Apr 30, 2012 9:43am
Dragan Radevic
9 years ago Aug 30, 2012 9:00am
Manu Prathab
9 years ago Oct 29, 2012 1:01pm
iBoss obama
9 years ago Oct 31, 2012 10:18am
Peter Plochan
9 years ago Jan 02, 2013 10:48am
Teppo Kurki
9 years ago Jan 17, 2013 7:38am
kailasapu murali
9 years ago Jan 21, 2013 1:50pm
Henri Kerola
9 years ago Jan 21, 2013 2:04pm
kailasapu murali
9 years ago Jan 22, 2013 4:09am
Oliver Sahlmann
9 years ago Feb 18, 2013 10:48am

Hey Henri,

Acutally the popup closes when I click somewhere outside the popup.
I would like to switch this behaviour to only close the popup when a my ClickListener is fired.

In all other cases the popup should stay visible.

THX
Oliver