Hi Team,
I found the screen overriding mechanism does not work sometimes.
Through exploring the source code, I found a possible cause is loading for WindowInfo does not consider the dependencies between Jmix modules.
As a workaround ,I extended the WindowConfig class and override the registerScreen method like following:
@Override
protected void registerScreen(String id, WindowInfo windowInfo) {
if(screens.containsKey(id)){
WindowInfo existingWindowInfo = screens.get(id);
JmixModuleDescriptor module1 = inferJmixModule(windowInfo);
JmixModuleDescriptor module2 = inferJmixModule(existingWindowInfo);
if (module1!=null&&module2!=null){
if (!module1.dependsOn(module2)){
return;
}
}
}
super.registerScreen(id, windowInfo);
}
This will work fine.
Please check if there is a bug.
Regards,
Ray