@RequestReceiver("InputChanged") @EventSender(CriterionChanged.class) void inputChanged( final int index, final Request<ChangedEvent> request, final Response<Criterion, CriterionChanged> response) { final String formitem = request.gesture().getItem().getName(); if ("combobox".equals(formitem) || "picker".equals(formitem)) { getSelectedCriterion().setText(request.gesture().getValue().toString()); } else if ("from".equals(formitem)) { setDateValue(0, request.gesture().getValue()); } else if ("to".equals(formitem)) { setDateValue(1, request.gesture().getValue()); } response.onSuccess(getSelectedCriterion()); }
@RequestReceiver("SearchTypeChanged") @EventSender(CriterionChanged.class) void searchtypeChanged( final Request<ChangedEvent> request, final Response<Criterion, CriterionChanged> response) { changeSearchType(request.gesture().getValue().toString()); response.event().selectedCriterion = selectedCriterion; response.success(); }
@RequestReceiver("CriterionChanged") @EventSender(CriterionChanged.class) void criterionChanged( final Request<ChangedEvent> request, final Response<Criterion, CriterionChanged> response) { final String selectedCriterion = request.gesture().getValue().toString(); this.selectedCriterion = criteria.get(this.selectedCriterion.displaytype).get(selectedCriterion); selectedCriterionHistory.put(this.selectedCriterion.displaytype, this.selectedCriterion); response.onSuccess(getSelectedCriterion()); }