Access new screen from a button

Hello,

Into a browser screen I show a chart based on some dateField(s).
Everything works fine but the data is to crowdy so I plan to open the chart into a (new) screen from a button.
I created a new (chart) blank screen but the main problem is that in this new (chart) screen I cannot have access to the original (browser) screen (start/end) dates.

image

  @Subscribe("chartButt")
    public void onChartButtClick(Button.ClickEvent event) {
        screenBuilders.screen(this).withScreenId("x_ChartScreen").withLaunchMode(OpenMode.DIALOG).show();
// chartMethod();
        
    }

If I try to call a method from the original browser screen chartMethod() I don’t have access to the pieChart from the new created chart screen.
image

Is there any possibility to inject an element from a screen to another (controller) screen?
Please advise! What is the best approach?

What about passing the parameters to the screen?
https://doc.cuba-platform.com/manual-7.1/opening_screens.html

2 Likes

It works.
Thank you!