Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1281 → Rev 1282

/trunk/src/org/tela_botanica/del/client/composants/metadonnees/MetadonneesPresenteur.java
84,6 → 84,8
public void activerLienAuteur();
public HasClickHandlers getLienIdentiplante();
 
void desactiverLienAuteur();
}
 
private Vue vue;
142,138 → 144,146
protected void gererEvenements() {
if (this.avecLiens) {
vue.getLienAuteur().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setAuteur(vue.getAuteur().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
if(!observation.getIdAuteur().equals("0")) {
vue.getLienAuteur().addClickHandler(new ClickHandler() {
vue.getLienDateReleve().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setDate(vue.getDateReleve().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setAuteur(vue.getAuteur().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
}
});
 
vue.getLienDateTransmission().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setDate(vue.getDateReleve().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
 
vue.getLienFamille().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setFamille(vue.getFamille().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
 
vue.getLienLocalite().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setCommune(vue.getLocalite().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
 
vue.getLienMotsClefs().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setMotClef(vue.getMotsClefs().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
 
vue.getLienNomCommun().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setRechercheLibre(vue.getNomCommun().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
 
vue.getLienNomRetenu().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setRechercheLibre(vue.getNomRetenu().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
 
vue.getLienMilieu().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setRechercheLibre(vue.getMilieu().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
 
vue.getLienCommentaire().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setRechercheLibre(vue.getCommentaire().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
 
final Observation monobservation = this.observation;
vue.getLienIdentiplante().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
CacheClient.getInstance().setObservationCourante(monobservation);
BusEvenementiel.getInstance().fireEvent(new EvenementValidation(monobservation));
}
});
vue.activerLiens();
} else {
vue.getLienAuteur().addClickHandler(new ClickHandler() {
vue.getLienDateReleve().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setDate(vue.getDateReleve().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
vue.getLienDateTransmission().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setDate(vue.getDateReleve().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
vue.getLienFamille().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setFamille(vue.getFamille().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
vue.getLienLocalite().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setCommune(vue.getLocalite().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
vue.getLienMotsClefs().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setMotClef(vue.getMotsClefs().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
vue.getLienNomCommun().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setRechercheLibre(vue.getNomCommun().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
vue.getLienNomRetenu().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setRechercheLibre(vue.getNomRetenu().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
vue.getLienMilieu().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setRechercheLibre(vue.getMilieu().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
vue.getLienCommentaire().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRecherche = new InformationsRecherche();
informationsRecherche.setRechercheLibre(vue.getCommentaire().getText());
setInfosRechercheEnCacheEtLancerEvenement(informationsRecherche);
History.fireCurrentHistoryState();
}
});
final Observation monobservation = this.observation;
vue.getLienIdentiplante().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Config config = new Config();
Window.open(config.getUrl("annuaire") + observation.getIdAuteur(), "Consultation de l'annuaire", null);
CacheClient.getInstance().setObservationCourante(monobservation);
BusEvenementiel.getInstance().fireEvent(new EvenementValidation(monobservation));
}
});
vue.activerLienAuteur();
vue.activerLiens();
if(observation.getIdAuteur().equals("0")) {
vue.desactiverLienAuteur();
}
} else {
if(!observation.getIdAuteur().equals("0")) {
vue.getLienAuteur().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Config config = new Config();
Window.open(config.getUrl("annuaire") + observation.getIdAuteur(), "Consultation de l'annuaire", null);
}
});
vue.activerLienAuteur();
}
}
}