how to pass parameter in CUBA ?

Hi ,
In our application we have many custom editors. I want to pass some parameters from one page to another.
For example in one page we are giving some input (Say name), in that page a next button is there. Clicking on that it opens another page where we want the employee name that entered in previous page.
I am able to pass parameter by adding attribute to userSesion. Is there any optimized way to pass the parameter from one page to another ?

For passing parameters in screens use the params map that is available for all openWindow(), openLookup(), openEditor() methods. In the opened screen, the parameter values are available in the init() method.
See https://doc.cuba-platform.com/manual-6.2/abstractFrame.html

How do you pass a parameter to a regular (non-editor) screen? If I open a window as follows:


AppLoginWindow loginScreen = (AppLoginWindow) openWindow("do-login", WindowManager.OpenType.DIALOG);

How do I also pass a parameter into the map for the init method?

There is overloaded method accepting a map of parameters:


openWindow(String windowAlias, WindowManager.OpenType openType, Map<String, Object> params)

Use your IDE capabilities to find out what exists in API. For example, in IntelliJ on Windows, after typing openWindow( you can press Ctrl+P and see all variants of this method.