Action in button to navigate to another screen?


I am working with Cuba and I would like to put a button on which I click and I open a new page, it is something simple but right now I do not know how to do it. As I show in the screenshot, my button is in “screen.xml” and I want that when I click on it it shows “hirePoliza1”, to be able to be in the same window, can someone help me?

Thank you,

Hello, @jordi.gisbert.ponsoda

First of all you should set a method that will be invoked when button is clicked:

<button caption="Click me!"

Then in screen controller you can define any actions for this button:

public void click() {
    // show notification

    // or open other screen here
            "aboutWindow",    // screen alias ("id" of screen, defined in screens.xml)
            OpenType.THIS_TAB // how this screen should be opened


1 Like


Yes, it was just that. It’s what I needed but I did not know the names of the methods like OpenWindows and so on. Is there documentation where they can be seen? The IDE that I use also does not give me suggestions …

Thank you very much,

You can find detailed explanation in our documentation: link.

We recommend to use Intellij IDEA due to its wide functionality, for example it can show you all available methods for some class:


Moreover we have powerful Intellij IDEA Plugin: CUBA Plugin.



Thanks, I’ll take a look, I just use Intellij but it does not give me suggestions, I’ll need something to configure.


To display this suggestions you should use a hot-key. Intellij IDEA key map reference can be found here: link.