diff --git a/modules/qi-core/src/main/java/org/jpos/qi/QIEntityView.java b/modules/qi-core/src/main/java/org/jpos/qi/QIEntityView.java index 8bd0c492c4..04ce930dca 100644 --- a/modules/qi-core/src/main/java/org/jpos/qi/QIEntityView.java +++ b/modules/qi-core/src/main/java/org/jpos/qi/QIEntityView.java @@ -192,13 +192,17 @@ protected HorizontalLayout createHeader (String title) { Button addBtn = new Button(getApp().getMessage("add")); addBtn.addStyleName("borderless-colored"); addBtn.setIcon(VaadinIcons.PLUS); - addBtn.addClickListener(event -> getApp().getNavigator().navigateTo(generalRoute + "/new")); + addBtn.addClickListener(event -> navigateToNewRoute()); header.addComponent(addBtn); header.setComponentAlignment(addBtn, Alignment.BOTTOM_RIGHT); } return header; } + protected void navigateToNewRoute() { + getApp().getNavigator().navigateTo(generalRoute + "/new"); + } + public Grid createGrid() { Grid g = new Grid(); g.setSizeFull();