Search in sources :

Example 1 with SearchSpecificLayout

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);
}
Also used : Window(com.vaadin.ui.Window) SearchSpecificLayout(de.symeda.sormas.ui.SearchSpecificLayout)

Example 2 with SearchSpecificLayout

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);
}
Also used : Window(com.vaadin.ui.Window) SearchSpecificLayout(de.symeda.sormas.ui.SearchSpecificLayout)

Example 3 with SearchSpecificLayout

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);
}
Also used : SearchSpecificLayout(de.symeda.sormas.ui.SearchSpecificLayout) TextField(com.vaadin.ui.TextField)

Example 4 with SearchSpecificLayout

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);
}
Also used : SearchSpecificLayout(de.symeda.sormas.ui.SearchSpecificLayout) TextField(com.vaadin.ui.TextField)

Example 5 with SearchSpecificLayout

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);
}
Also used : Window(com.vaadin.ui.Window) SearchSpecificLayout(de.symeda.sormas.ui.SearchSpecificLayout)

Aggregations

SearchSpecificLayout (de.symeda.sormas.ui.SearchSpecificLayout)5 Window (com.vaadin.ui.Window)3 TextField (com.vaadin.ui.TextField)2