Hi guys,
How should I properly Cast AbstractWindow to Class which it represents.
MyCustomWindow customWindow =
(MyCustomWindow) openWindow(
"custom-window",
WindowManager.OpenType.DIALOG,
ParamsMap.of("value",origin, "split", true));
And getting error
Caused by: java.lang.ClassCastException: com.company.test.web.screens.MyCustomWindow
cannot be cast to com.company.test.web.screens.MyCustomWindow
Can someone help how to avoid this error ?
I came accross same approach as I am doing in here: cuba/UserBrowser.java at a5d7e58d0e883650c0fe2312fc7c9778e6f672ad · cuba-platform/cuba · GitHub
at changePasswordAtLogon()
Any help appriciated
Or should I just stick with:
AbstractWindow customWindow =
openWindow(...);
...
((MyCustomWindow) customWindow).getInfo()
((MyCustomWindow) customWindow).getInfo2()
((MyCustomWindow) customWindow).getInfo3()