Revision c46954e3
Added by Andreas Kohlbecker almost 7 years ago
src/main/java/eu/etaxonomy/vaadin/ui/navigation/NavigationManagerBean.java | ||
---|---|---|
116 | 116 |
@Override |
117 | 117 |
public <T extends PopupView> T showInPopup(Class<T> popupType) { |
118 | 118 |
|
119 |
PopupView popupContent = findPopupView(popupType).get(); // TODO make better use of Optional
|
|
119 |
PopupView popupView = findPopupView(popupType).get(); // TODO make better use of Optional
|
|
120 | 120 |
|
121 | 121 |
Window window = new Window(); |
122 |
window.setCaption(popupContent.getWindowCaption());
|
|
122 |
window.setCaption(popupView.getWindowCaption());
|
|
123 | 123 |
window.center(); |
124 |
window.setResizable(popupContent.isResizable()); |
|
125 |
window.setModal(popupContent.isModal()); |
|
126 |
window.setCaptionAsHtml(popupContent.isWindowCaptionAsHtml()); |
|
127 |
window.setWidth(popupContent.getWindowPixelWidth(), Unit.PIXELS); |
|
128 |
window.setContent(popupContent.asComponent()); |
|
124 |
window.setResizable(popupView.isResizable()); |
|
125 |
// due to issue #6673 (https://dev.e-taxonomy.eu/redmine/issues/6673) popup editors must be modal! |
|
126 |
//window.setModal(popupView.isModal()); |
|
127 |
window.setModal(true); |
|
128 |
window.setCaptionAsHtml(popupView.isWindowCaptionAsHtml()); |
|
129 |
window.setWidth(popupView.getWindowPixelWidth(), Unit.PIXELS); |
|
130 |
window.setContent(popupView.asComponent()); |
|
129 | 131 |
UI.getCurrent().addWindow(window); |
130 |
popupContent.focusFirst(); |
|
132 |
popupView.viewEntered(); |
|
133 |
popupView.focusFirst(); |
|
131 | 134 |
|
132 |
popupMap.put(popupContent, window);
|
|
135 |
popupMap.put(popupView, window);
|
|
133 | 136 |
|
134 |
return (T) popupContent;
|
|
137 |
return (T) popupView;
|
|
135 | 138 |
} |
136 | 139 |
|
137 | 140 |
@EventListener |
Also available in: Unified diff
ref #6169 RelatedEntityListSelect (ToOneRelatedEntityField) edit and select working, add blocked by #6673