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?
First of all you should set a method that will be invoked when button is clicked:
<button caption="Click me!"
invoke="click"/>
Then in screen controller you can define any actions for this button:
public void click() {
// show notification
showNotification("hirePoliza1");
// or open other screen here
openWindow(
"aboutWindow", // screen alias ("id" of screen, defined in screens.xml)
OpenType.THIS_TAB // how this screen should be opened
);
}
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 …