Skip to content

Commit

Permalink
Refactor in QIEntityView, navigate to new route now on own method
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfinc committed Sep 8, 2017
1 parent 6507b70 commit fa4b2ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/qi-core/src/main/java/org/jpos/qi/QIEntityView.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit fa4b2ad

Please # to comment.