|
|
|
@ -30,7 +30,7 @@ import de.kreth.vaadin.clubhelper.vaadinclubhelper.ui.components.PersonGrid; |
|
|
|
|
|
|
|
|
|
|
|
@Theme("vaadin-clubhelpertheme") |
|
|
|
@Theme("vaadin-clubhelpertheme") |
|
|
|
@SpringUI |
|
|
|
@SpringUI |
|
|
|
@Push(value=PushMode.MANUAL) |
|
|
|
@Push(value = PushMode.MANUAL) |
|
|
|
public class MainUi extends UI { |
|
|
|
public class MainUi extends UI { |
|
|
|
|
|
|
|
|
|
|
|
private static final long serialVersionUID = 7581634188909841919L; |
|
|
|
private static final long serialVersionUID = 7581634188909841919L; |
|
|
|
@ -41,7 +41,7 @@ public class MainUi extends UI { |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
GroupDao groupDao; |
|
|
|
GroupDao groupDao; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
EventBusiness eventBusiness; |
|
|
|
EventBusiness eventBusiness; |
|
|
|
|
|
|
|
|
|
|
|
@ -70,7 +70,7 @@ public class MainUi extends UI { |
|
|
|
contentLayout = new HorizontalLayout(); |
|
|
|
contentLayout = new HorizontalLayout(); |
|
|
|
contentLayout.setSizeFull(); |
|
|
|
contentLayout.setSizeFull(); |
|
|
|
contentLayout.addComponents(calendar); |
|
|
|
contentLayout.addComponents(calendar); |
|
|
|
|
|
|
|
|
|
|
|
setContent(contentLayout); |
|
|
|
setContent(contentLayout); |
|
|
|
setSizeFull(); |
|
|
|
setSizeFull(); |
|
|
|
|
|
|
|
|
|
|
|
@ -84,7 +84,7 @@ public class MainUi extends UI { |
|
|
|
calendar.setItems(events); |
|
|
|
calendar.setItems(events); |
|
|
|
ui.push(); |
|
|
|
ui.push(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
exec.shutdown(); |
|
|
|
exec.shutdown(); |
|
|
|
LOGGER.info("Loaded UI and started fetch of Events"); |
|
|
|
LOGGER.info("Loaded UI and started fetch of Events"); |
|
|
|
@ -94,7 +94,7 @@ public class MainUi extends UI { |
|
|
|
PersonEditDialog dlg = new PersonEditDialog(groupDao.listAll(), p, personDao); |
|
|
|
PersonEditDialog dlg = new PersonEditDialog(groupDao.listAll(), p, personDao); |
|
|
|
getUI().addWindow(dlg); |
|
|
|
getUI().addWindow(dlg); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void personSelectionChange(SelectionEvent<Person> ev) { |
|
|
|
private void personSelectionChange(SelectionEvent<Person> ev) { |
|
|
|
Set<Person> selected = ev.getAllSelectedItems(); |
|
|
|
Set<Person> selected = ev.getAllSelectedItems(); |
|
|
|
LOGGER.debug("Selection changed to: {}", selected); |
|
|
|
LOGGER.debug("Selection changed to: {}", selected); |
|
|
|
@ -110,14 +110,14 @@ public class MainUi extends UI { |
|
|
|
ClubEvent ev = (ClubEvent) event.getCalendarItem(); |
|
|
|
ClubEvent ev = (ClubEvent) event.getCalendarItem(); |
|
|
|
LOGGER.debug("Opening detail view for {}", ev); |
|
|
|
LOGGER.debug("Opening detail view for {}", ev); |
|
|
|
|
|
|
|
|
|
|
|
contentLayout.removeComponent(personGrid); |
|
|
|
// contentLayout.removeComponent(personGrid);
|
|
|
|
contentLayout.addComponent(personGrid); |
|
|
|
// contentLayout.addComponent(personGrid);
|
|
|
|
|
|
|
|
|
|
|
|
eventBusiness.setSelected(null); |
|
|
|
eventBusiness.setSelected(null); |
|
|
|
personGrid.setEnabled(false); |
|
|
|
// personGrid.setEnabled(false);
|
|
|
|
personGrid.setEvent(ev); |
|
|
|
// personGrid.setEvent(ev);
|
|
|
|
personGrid.setVisible(true); |
|
|
|
// personGrid.setVisible(true);
|
|
|
|
personGrid.setEnabled(true); |
|
|
|
// personGrid.setEnabled(true);
|
|
|
|
eventBusiness.setSelected(ev); |
|
|
|
eventBusiness.setSelected(ev); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|