use of de.symeda.sormas.ui.SearchSpecificLayout in project SORMAS-Project by hzi-braunschweig.
the class ImmunizationDataForm method buildAndOpenSearchSpecificCaseWindow.
private void buildAndOpenSearchSpecificCaseWindow() {
Window window = VaadinUiUtil.createPopupWindow();
window.setCaption(I18nProperties.getCaption(Captions.caseSearchSpecificCase));
window.setWidth(768, Unit.PIXELS);
SearchSpecificLayout layout = buildSearchSpecificLayout(window);
window.setContent(layout);
UI.getCurrent().addWindow(window);
}
use of de.symeda.sormas.ui.SearchSpecificLayout in project SORMAS-Project by hzi-braunschweig.
the class EventsView method buildAndOpenSearchSpecificEventWindow.
private void buildAndOpenSearchSpecificEventWindow() {
Window window = VaadinUiUtil.createPopupWindow();
window.setCaption(I18nProperties.getCaption(Captions.eventSearchSpecificEvent));
window.setWidth(768, Unit.PIXELS);
SearchSpecificLayout layout = buildSearchSpecificLayout(window);
window.setContent(layout);
UI.getCurrent().addWindow(window);
}
use of de.symeda.sormas.ui.SearchSpecificLayout in project SORMAS-Project by hzi-braunschweig.
the class EventsView method buildSearchSpecificLayout.
private SearchSpecificLayout buildSearchSpecificLayout(Window window) {
String description = I18nProperties.getString(Strings.infoSpecificEventSearch);
String confirmCaption = I18nProperties.getCaption(Captions.eventSearchEvent);
TextField searchField = new TextField();
Runnable confirmCallback = () -> {
String foundEventUuid = FacadeProvider.getEventFacade().getUuidByCaseUuidOrPersonUuid(searchField.getValue());
if (foundEventUuid != null) {
ControllerProvider.getEventController().navigateToData(foundEventUuid);
window.close();
} else {
VaadinUiUtil.showSimplePopupWindow(I18nProperties.getString(Strings.headingNoEventFound), I18nProperties.getString(Strings.messageNoEventFound));
}
};
return new SearchSpecificLayout(confirmCallback, () -> window.close(), searchField, description, confirmCaption);
}
use of de.symeda.sormas.ui.SearchSpecificLayout in project SORMAS-Project by hzi-braunschweig.
the class CasesView method buildSearchSpecificLayout.
private SearchSpecificLayout buildSearchSpecificLayout(Window window) {
String description = I18nProperties.getString(Strings.infoSpecificCaseSearch);
String confirmCaption = I18nProperties.getCaption(Captions.caseSearchCase);
TextField searchField = new TextField();
Runnable confirmCallback = () -> {
String foundCaseUuid = FacadeProvider.getCaseFacade().getUuidByUuidEpidNumberOrExternalId(searchField.getValue(), null);
if (foundCaseUuid != null) {
ControllerProvider.getCaseController().navigateToCase(foundCaseUuid);
window.close();
} else {
VaadinUiUtil.showSimplePopupWindow(I18nProperties.getString(Strings.headingNoCaseFound), I18nProperties.getString(Strings.messageNoCaseFound));
}
};
return new SearchSpecificLayout(confirmCallback, window::close, searchField, description, confirmCaption);
}
use of de.symeda.sormas.ui.SearchSpecificLayout in project SORMAS-Project by hzi-braunschweig.
the class CasesView method buildAndOpenSearchSpecificCaseWindow.
private void buildAndOpenSearchSpecificCaseWindow() {
Window window = VaadinUiUtil.createPopupWindow();
window.setCaption(I18nProperties.getCaption(Captions.caseSearchSpecificCase));
window.setWidth(768, Unit.PIXELS);
SearchSpecificLayout layout = buildSearchSpecificLayout(window);
window.setContent(layout);
UI.getCurrent().addWindow(window);
}
Aggregations