Open a Browse view from a Browse view

Hi There!

I’ve been trying to figure out out how certain components hang together.

for example: I have a browse screen with an index (I have removed the ‘create, edit and remove’ buttons) in it. When i select an item in the index i would like to open another browse screen containing all the values from another table who’s index value matches the index i selected. How do I trigger a view screen to open (or any custom designed screen for that matter) and how do I access the selected index from the last screen in order to filter my values (probably with a query) in the new screen?

Huge thanks in advance for any help!
regards

Hi Christian,

You can open browse screens with openWindow() method of the screen controller and pass parameters to these screens in the map which is an argument of this method. The parameters are available in invoked screen in its init() method or can be injected with @WindowParam annotation.

There is a number of examples of screens interaction here: GitHub - cuba-platform/sample-screen-manipulation: DEPRECATED. See https://github.com/cuba-platform/sample-generic-ui. This sample app is also available in Studio on the Samples tab.

Hi Konstantin

Thank you for your response!

I was able to do exactly what I needed with your advice.

Kind Regards
Christian