Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1862 → Rev 1863

/trunk/src/org/tela_botanica/client/Mediateur.java
1410,26 → 1410,10
}
@Override
public void surFormulaireEnvoye(SubmitCompleteEvent event) {
JSONValue responseValue = JSONParser.parseStrict(event.getResults());
String message = "";
if(PublicationAsyncDao.importEstUnSucces(responseValue)) {
String nbPubliImportee = PublicationAsyncDao.getNbPublisImportees(responseValue);
int nbPublint = Integer.parseInt(nbPubliImportee);
message = (nbPublint == 1) ? i18nM.retourSuccesImportPublication(nbPubliImportee) :
i18nM.retourSuccesImportPublicationPluriel(nbPubliImportee);
fenetre.hide();
// Tri artificiel par id de publications pour voir apparaître ce qui vient d'être importé
PublicationAsyncDao.tri = "cpu_id_publication";
publiListeVue.afficherDernierePage();
} else {
message = i18nM.retourEchecImportPublication(PublicationAsyncDao.getErreursImport(responseValue));
}
Window.alert(message);
masquerPopinChargement();
public void surFormulaireEnvoye(JSONValue responseValue) {
traiterRetourImportFormulaire(responseValue);
publiListeVue.afficherDernierePage();
fenetre.hide();
}
@Override
1441,6 → 1425,24
fenetre.show();
}
private void traiterRetourImportFormulaire(JSONValue responseValue) {
String message = "";
if(PublicationAsyncDao.importEstUnSucces(responseValue)) {
String nbPubliImportee = PublicationAsyncDao.getNbPublisImportees(responseValue);
int nbPublint = Integer.parseInt(nbPubliImportee);
message = (nbPublint == 1) ? i18nM.retourSuccesImportPublication(nbPubliImportee) :
i18nM.retourSuccesImportPublicationPluriel(nbPubliImportee);
// Tri artificiel par id de publications pour voir apparaître ce qui vient d'être importé
PublicationAsyncDao.tri = "cpu_id_publication";
} else {
message = i18nM.retourEchecImportPublication(PublicationAsyncDao.getErreursImport(responseValue));
}
Window.alert(message);
masquerPopinChargement();
}
//+----------------------------------------------------------------------------------------------------------------+
// GESTION de la relation PUBLICATION A PERSONNE