PopupButton Issue

Hi,
I’ve found a couple of issue

  1. i am trying to use a PopupButton as an help page.
    These are the steps to reproduce the problem:
  • click on the popup button

  • the page is correclty opened where expected, under the button (see screenshot below).
    image

  • click on another point of the screen to let the popup correctly disappear.

  • click again on the popup button

  • This time the popup is displayed in a wrong way. It’s shown above the button and partially outside of the screen (see screenshot below).

image

I tried to use popupOpenDirection=“BOTTOM_LEFT” but its still not working.

I am trying to use the scollbox tag to make the popup scrollable (see screenshot below).

image

The problem is that the scrollbar is not visible (see screenshot below).

image

Let me know, thank you,

Matar

Hi,

Could you please attach a small demo project that reproduces the issue?

Regards,
Gelb

Hi,

I’ve updated the ticket info above so that hopfully is more clear now.
Let me know if you need more,
Thank you,

Matar Loum

PopupButton isn’t intended to be used as a help page, take a look at the contextHelp attribute instead. For complex layout you can subscribe on ContextClickEvent and show MessageDialog with help text.

In order to display scrollbars, ScrollBox component must have size, in your layout it has auto size which means that it has size equals to it content size, hence no scrollbars available.

PopupButton can show its popup in different location if no enough space available to display popup.

Regards,
Gleb

Ok thank you,

I’ll try to use the component you suggested.
I saw that is possible to create a MessageDialog from the Controller using HTML, It’s possibile to put an image inside the MessageDialog ?
Thank you,

Matar Loum

Only HTML <img> tag. If you want to use the Image component, then you can create a custom screen with help info and show it instead of MessageDialog.

Regards,
Gleb

Hi Gleb,

I tried with your suggestion to use the ‘img’ tag loaded from the Controller:

image

I tried to put different paths to the image but i keep getting the following error:

image

This is the image path:

image

Let me know if we need to do a call to solve this.

Thank you,

Matar Loum

Hi Matar,

Spring Boot serves static resources from a predefined set of directories on the classpath, see Spring Boot docs

Try to move your files to src/main/resources/static/ and refer them in HTML accordingly, like <img src='/formulas.jpg' ...>

Perfect, following your suggestion its working.
Thank you!