ClassCastException: PolylineMapFrame cannot be cast to Window

java.lang.ClassCastException: com.haulmont.sampler.web.ui.charts.map.polyline.PolylineMapFrame cannot be cast to com.haulmont.cuba.gui.components.Window
	at com.haulmont.cuba.gui.components.WindowDelegate.wrapBy(WindowDelegate.java:75)
	at com.haulmont.cuba.web.gui.WebWindow.wrapBy(WebWindow.java:1294)
	at com.haulmont.cuba.gui.WindowManager.wrapByCustomClass(WindowManager.java:1136)
	at com.haulmont.cuba.gui.WindowManager.createWindow(WindowManager.java:520)
	at com.haulmont.cuba.gui.WindowManager.openWindow(WindowManager.java:708)
	at com.haulmont.cuba.web.WebWindowManager.openWindow(WebWindowManager.java:144)
	at com.haulmont.cuba.gui.config.MenuCommand$ScreenCommand.run(MenuCommand.java:181)
	at com.haulmont.cuba.gui.config.MenuCommand.execute(MenuCommand.java:76)

I am trying to trying to create Polyline map from the https://demo.cuba-platform.com/sampler/#!
and getting the error shown above

@cuba-platform any update on this issue?

Hi,

Pay attention that PolylineMapFrame extends AbstractFrame instead of AbstractWindow.

So, try to extend AbstractWindow and it should help.

Thanks It worked. @gorelov

I am trying to open map from other editor screen(journey) and I want to pass one parameter to map screen window from journey editor screen .

I am passing like this
ParamsMap.of(“journeyCode”, getItem().getJourneyCode())

How do i get this value in map screen window? inside init method
@Override
public void init(Map<String, Object> params) {
String journeyCode = “5A0mZMKCEH”;
}
currently i have hardcoded journey code as “5A0mZMKCEH”
@gorelov

Could you please create a separate topic for the new question?

1 Like

will do that. thanks