Closed alexbudarov closed 4 years ago
Example case - https://www.cuba-platform.com/discuss/t/entitylistener-not-affecting-an-instance-in-a-nested-graph-in-a-standardeditor/12708/16
Developer automatically creates new entities in a UI component. To merge them to data context, we need access to data context from component.
It takes some time to find that you can get DataContext by screen with this method:
DataContext dataContext = UiControllerUtils.getScreenData(screenOrFrame).getDataContext(); // or from UI component DataContext dataContext = UiControllerUtils.getScreenData(getFrame().getFrameOwner()).getDataContext();
I think it worth short mentioning on documentation page.
Environment
Description of the bug or enhancement
Example case - https://www.cuba-platform.com/discuss/t/entitylistener-not-affecting-an-instance-in-a-nested-graph-in-a-standardeditor/12708/16
Developer automatically creates new entities in a UI component. To merge them to data context, we need access to data context from component.
It takes some time to find that you can get DataContext by screen with this method:
I think it worth short mentioning on documentation page.