18,6 → 18,7 |
import com.google.gwt.event.dom.client.HasClickHandlers; |
import com.google.gwt.user.client.ui.HasWidgets; |
import com.google.gwt.user.client.ui.IsWidget; |
import com.google.gwt.user.client.ui.Label; |
|
public class ResultatsRechercheObservationsPresenteur extends Presenteur { |
|
44,13 → 45,26 |
public void afficherElementsAucunResultatTrouve(); |
|
public void afficherElementsResultatsTrouves(); |
|
public Label getLabelDate(); |
|
public void masquerDateAscendant(); |
|
public void masquerDateDescendant(); |
|
public void afficherDateAscendant(); |
|
public void afficherDateDescendant(); |
} |
|
private Vue vue; |
|
private ModeTri triCourantDate = ModeTri.TRI_ASCENDANT; |
|
public ResultatsRechercheObservationsPresenteur(ObservationService serviceObs, Vue vue) { |
this.vue = vue; |
this.serviceObs = serviceObs; |
vue.masquerDateAscendant(); |
vue.masquerDateDescendant(); |
} |
|
public void go(HasWidgets composite) { |
61,27 → 75,26 |
|
protected void gererEvenements() { |
|
vue.getTriParDateAscendant().addClickHandler(new ClickHandler() { |
|
vue.getLabelDate().addClickHandler(new ClickHandler() { |
@Override |
public void onClick(ClickEvent arg0) { |
public void onClick(ClickEvent event) { |
|
if (triCourantDate == ModeTri.TRI_ASCENDANT) { |
triCourantDate = ModeTri.TRI_DESCENDANT; |
vue.masquerDateAscendant(); |
vue.afficherDateDescendant(); |
} else { |
triCourantDate = ModeTri.TRI_ASCENDANT; |
vue.masquerDateDescendant(); |
vue.afficherDateAscendant(); |
} |
|
InformationsRecherche informationsRechercheObservations = CacheClient.getInstance().getInformationsRechercheObservation(); |
informationsRechercheObservations.setTriParDate(ModeTri.TRI_ASCENDANT); |
informationsRechercheObservations.setTriParDate(triCourantDate); |
informationsRechercheObservations.setTriParNbVotes(ModeTri.PAS_DE_TRI); |
chercherEtAfficherObservationsPageEnCours(); |
} |
}); |
|
vue.getTriParDateDescendant().addClickHandler(new ClickHandler() { |
|
@Override |
public void onClick(ClickEvent arg0) { |
InformationsRecherche informationsRechercheObservations = CacheClient.getInstance().getInformationsRechercheObservation(); |
informationsRechercheObservations.setTriParDate(ModeTri.TRI_DESCENDANT); |
informationsRechercheObservations.setTriParNbVotes(ModeTri.PAS_DE_TRI); |
chercherEtAfficherObservationsPageEnCours(); |
} |
}); |
} |
|
public void chargerEtAfficherObservations(int debut, int fin) { |