@Override protected void init(final VaadinRequest request) { setLocale(RUSSIAN_LOCALE); DashboardEventBus.register(this); Responsive.makeResponsive(this); addStyleName(ValoTheme.UI_WITH_MENU); updateContent(); Page.getCurrent() .addBrowserWindowResizeListener(event -> DashboardEventBus.post(new BrowserResizeEvent())); }
private void search() { if (StringUtil.isEmpty(cardNuberField.getValue()) || StringUtil.isEmpty(checkwordField.getValue())) { showError("Необходимо указать Логин и Проверочное слово"); return; } Holder holder; MlUser user = (MlUser) getUserDao().getUserByLogin(cardNuberField.getValue()); if (user != null) { holder = user.getHolder(); if (holder == null || !holder.getCheckword().equals(checkwordField.getValue())) { showError("Держатель с указанными данными не обнаружен"); } else { DashboardEventBus.post(new DashboardEvent.CardholderFindEvent(holder)); } } }
public CardholderSearchLayout() { initComponents(); DashboardEventBus.register(this); }