Opening a popupview

Hello,

I have a popupView which needs to be opened. I tried using the setPopupVisible(true), this works but the position of the popupView is on the bottom left of the screen, i could’nt change the position by setting the alignment too.

Then, i came across a post in the forum which said we need to use the openWindow function and open it as Dialog, if i want to use the openWindow function what would be the windowAlias for the popupView ? What is the best way to go about it, just want the popup to appear in the middle of the screen when some condition is true ?

Regards,
Adnan

Hi,

What CUBA Platform version do you use?

Also, it would be helpful if you either share a demo project or a code snippet with the example of incorrect PopupView work.

In addition, you can try this code snippet, which works perfectly for me:

<popupView caption="Hide on mouse out" minimizedValue="Click me!">
	<vbox width="60px" height="40px">
		<label value="Content" align="MIDDLE_CENTER"/>
	</vbox>
</popupView>

Examples of PopupView usage can be found in the Sampler app:

Regards,
Gleb

Hi,

I have already tried these and the popview has been working fine from before. my question is:
In the following link :In table view add image and want to open popupview on that link click - CUBA.Platform
He says “To open a popup you should use openWindow with OpenType.DIALOG”

Could you please tell me how this is done and since the parameters for openWindow are (windowAlias, openType), What would be the windowAlias for the popupView?

Also, this is my popupView:

    <popupView id="mypopupView"
               align="MIDDLE_CENTER"
               hideOnMouseOut="false"
               responsive="true">
        <vbox spacing="true"
              width="AUTO">
            <optionsGroup id="myoptionsGroup"
                          caption="something"
                          required="true"/>
            <button id="select"
                    caption="Select"
                    invoke="onSelectbuttonClick"/>
        </vbox>
    </popupView>

but the popupView appears in the bottom left corner of the page, i dont understand why

Also, Im using Cuba Platform 6.7.3

Regards,
AdnanCapture

Answer in the mentioned topic doesn’t relate to the PopupView component. The suggestion was to open a new window in the DIALOG mode to simulate PopupVIew. Also, pay attention that this topic is outdated because instead of the Embedded component you need to use the Image component to display images.

So, I suppose, that we need to clarify your needs. Do you have problems with the PopupView component itself (if so, please attach a sample project which reproduces the problem) or you want to implement some functionality and it seems that PopupView fits your need but you need some clarification how to properly use this component or some advice with another approach.

Regards,
Gleb

Thank you for the quick reply. Okay, I got confused between the popview and the Popup in the link.

My popview works just fine. I only have issues with the alignment and the position of the popview, if you could see the above image, the popview is on the bottom left corner of the screen, how do i get it to the center of the screen

Regards,
Adnan

PopupView should appear near minimize view (text which looks like a link) and this behavior can’t be changed. Could you, please, attach a sample project which reproduces the problem?

1 Like