ClassCastException: PolylineMapFrame cannot be cast to Window

java.lang.ClassCastException: cannot be cast to com.haulmont.cuba.gui.components.Window
	at com.haulmont.cuba.gui.components.WindowDelegate.wrapBy(
	at com.haulmont.cuba.web.gui.WebWindow.wrapBy(
	at com.haulmont.cuba.gui.WindowManager.wrapByCustomClass(
	at com.haulmont.cuba.gui.WindowManager.createWindow(
	at com.haulmont.cuba.gui.WindowManager.openWindow(
	at com.haulmont.cuba.web.WebWindowManager.openWindow(
	at com.haulmont.cuba.gui.config.MenuCommand$
	at com.haulmont.cuba.gui.config.MenuCommand.execute(

I am trying to trying to create Polyline map from the!
and getting the error shown above

@cuba-platform any update on this issue?


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
public void init(Map<String, Object> params) {
String journeyCode = “5A0mZMKCEH”;
currently i have hardcoded journey code as “5A0mZMKCEH”

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

1 Like

will do that. thanks