GetRaceListViewAction is now called with a regattaId to make it work

with multi regatta events and series events
This commit is contained in:
Steffen Schaefer committed 2015-07-06 10:16:01 +02:00
1 parent cf96b88a9c
commit 6dcff55345
2 files changed
+4 -3

No files matched your search

@@ -98,7 +98,7 @@ public class RegattaRacesTabView extends Composite implements RegattaTabView<Reg
listNavigationPanelUi.addAction(Navigation.SORT_LIST_FORMAT, true);
// listNavigationPanelUi.addAction(Navigation.COMPETITION_FORMAT, false);
GetRaceListViewAction action = new GetRaceListViewAction(myPlace.getCtx().getEventDTO().getId());
GetRaceListViewAction action = new GetRaceListViewAction(myPlace.getCtx().getEventDTO().getId(), myPlace.getRegattaId());
currentPresenter.getDispatch().execute(action, new AsyncCallback<ResultWithTTL<RaceListViewDTO>>() {
@Override
public void onFailure(Throwable caught) {
@@ -14,11 +14,12 @@ public class GetRaceListViewAction implements Action<ResultWithTTL<RaceListViewD
private static final Logger logger = Logger.getLogger(GetRaceListViewAction.class.getName());
private UUID eventId;
private String regattaId;
public GetRaceListViewAction() {
}
public GetRaceListViewAction(UUID eventId) {
public GetRaceListViewAction(UUID eventId, String regattaId) {
this.eventId = eventId;
}
@@ -27,7 +28,7 @@ public class GetRaceListViewAction implements Action<ResultWithTTL<RaceListViewD
public ResultWithTTL<RaceListViewDTO> execute(DispatchContext context) {
long start = System.currentTimeMillis();
RaceListDataCalculator raceListDataCalculator = new RaceListDataCalculator();
EventActionUtil.forRacesOfEvent(context, eventId, raceListDataCalculator);
EventActionUtil.forRacesOfRegatta(context, eventId, regattaId, raceListDataCalculator);
ResultWithTTL<RaceListViewDTO> result = raceListDataCalculator.getResult();
long duration = System.currentTimeMillis() - start;