Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 601 → Rev 602

/trunk/.classpath
1,7 → 1,7
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="test"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="lib" path="/opt/gwt-1.7.0/gwt-user.jar"/>
<classpathentry kind="lib" path="/opt/gwt-1.7.0/gwt-dev-linux.jar"/>
<classpathentry kind="lib" path="/opt/gxt-2.0.1/gxt.jar"/>
/trunk/src/org/tela_botanica/client/modeles/StructureAPersonneAsyncDao.java
19,7 → 19,7
public class StructureAPersonneAsyncDao {
private static final String SERVICE_NOM = "CoelStructureAPersonne";
public void selectionner(final Rafraichissable r, String idUtilisateur, final String idStructure, final String idRole) {
public void selectionner(final Rafraichissable vueARafraichir, String idUtilisateur, final String idStructure, final String idRole) {
// Ajout des paramètres et données à selectionner dans l'URL
final String url = ((Configuration) Registry.get(RegistreId.CONFIG)).getServiceBaseUrl() +
SERVICE_NOM + "/" +
60,7 → 60,7
StructureAPersonneListe personnel = new StructureAPersonneListe(reponse);
info.setDonnee(0, personnel);
// et on met à jour le demandeur des données
r.rafraichir(info);
vueARafraichir.rafraichir(info);
} else {
GWT.log(url+"\n\tLa réponse n'est pas un talbeau JSON et vaut : "+responseValue.toString(), null);
}
69,7 → 69,7
// Dans le cas, où nous demandons toutes les relations Structure à Personne et qu'il n'y en a pas, nous retournons un message d'information
Information info = new Information("liste_structure_a_personne");
info.setMessage("Aucun personnel");
r.rafraichir(info);
vueARafraichir.rafraichir(info);
} else {
GWT.log(url, null);
if (response.getText().length() == 0) {
95,25 → 95,10
SERVICE_NOM + "/";
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, url);
String postDonnees = "cmhl_ce_modifier_par=" + utilisateurId +
"&csap_id_structure=" + structureId +
"&csap_id_personne=" + URL.encodeComponent(personnel.getIdPersonne()) +
"&csap_id_role=" + URL.encodeComponent(personnel.getIdRole()) +
"&csap_ce_truk_fonction=" + URL.encodeComponent(personnel.getFonction()) +
"&csap_service=" + URL.encodeComponent(personnel.getService()) +
"&csap_ce_truk_statut=" + URL.encodeComponent(personnel.getStatut()) +
"&csap_mark_contact=" + URL.encodeComponent(personnel.getContact()) +
"&csap_bota_travail_hebdo_tps=" + URL.encodeComponent(personnel.getBotaTravailHebdoTps()) +
"&cp_prenom=" + URL.encodeComponent(personnel.getPrenom()) +
"&cp_nom=" + URL.encodeComponent(personnel.getNom()) +
"&cp_truk_telephone=" + URL.encodeComponent(personnel.getTelephone()) +
"&cp_truk_fax=" + URL.encodeComponent(personnel.getFax()) +
"&cp_truk_courriel=" + URL.encodeComponent(personnel.getCourriel()) +
"&cp_ce_truk_specialite=" + URL.encodeComponent(personnel.getSpecialite()) +
"";
String postDonneesEncodees = construirePost(utilisateurId, structureId, personnel);
try {
rb.sendRequest(postDonnees, new RequestCallback() {
rb.sendRequest(postDonneesEncodees, new RequestCallback() {
public void onError(Request request, Throwable exception) {
// Gestion des exceptions déclenchées par l'exécution de la requête
173,22 → 158,10
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, url);
String postDonnees = "cmhl_ce_modifier_par=" + utilisateurId +
"&csap_ce_truk_fonction=" + URL.encodeComponent(personnel.getFonction()) +
"&csap_service=" + URL.encodeComponent(personnel.getService()) +
"&csap_ce_truk_statut=" + URL.encodeComponent(personnel.getStatut()) +
"&csap_mark_contact=" + URL.encodeComponent(personnel.getContact()) +
"&csap_bota_travail_hebdo_tps=" + URL.encodeComponent(personnel.getBotaTravailHebdoTps()) +
"&cp_prenom=" + URL.encodeComponent(personnel.getPrenom()) +
"&cp_nom=" + URL.encodeComponent(personnel.getNom()) +
"&cp_truk_telephone=" + URL.encodeComponent(personnel.getTelephone()) +
"&cp_truk_fax=" + URL.encodeComponent(personnel.getFax()) +
"&cp_truk_courriel=" + URL.encodeComponent(personnel.getCourriel()) +
"&cp_ce_truk_specialite=" + URL.encodeComponent(personnel.getSpecialite()) +
"";
String postDonneesEncodees = construirePost(utilisateurId, null, personnel);
try {
rb.sendRequest(postDonnees, new RequestCallback() {
rb.sendRequest(postDonneesEncodees, new RequestCallback() {
public void onError(Request request, Throwable exception) {
// Gestion des exceptions déclenchées par l'exécution de la requête
301,4 → 274,25
}
}
private String construirePost(String utilisateurId, String structureId, StructureAPersonne personnel) {
String postDonnees = "cmhl_ce_modifier_par=" + URL.encodeComponent(utilisateurId);
if (structureId != null) {
postDonnees += "&csap_id_structure=" + structureId;
}
postDonnees += "&csap_id_personne=" + URL.encodeComponent(personnel.getIdPersonne()) +
"&csap_id_role=" + URL.encodeComponent(personnel.getIdRole()) +
"&csap_ce_truk_fonction=" + URL.encodeComponent(personnel.getFonction()) +
"&csap_service=" + URL.encodeComponent(personnel.getService()) +
"&csap_ce_truk_statut=" + URL.encodeComponent(personnel.getStatut()) +
"&csap_mark_contact=" + URL.encodeComponent(personnel.getContact()) +
"&csap_bota_travail_hebdo_tps=" + URL.encodeComponent(personnel.getBotaTravailHebdoTps()) +
"&cp_prenom=" + URL.encodeComponent(personnel.getPrenom()) +
"&cp_nom=" + URL.encodeComponent(personnel.getNom()) +
"&cp_truk_telephone=" + URL.encodeComponent(personnel.getTelephone()) +
"&cp_truk_courriel=" + URL.encodeComponent(personnel.getCourriel()) +
"&cp_ce_truk_specialite=" + URL.encodeComponent(personnel.getSpecialite()) +
"";
return postDonnees;
}
}
/trunk/src/org/tela_botanica/client/modeles/Personne.java
16,6 → 16,7
public static final String PREFIXE = "cp";
public static final String TELEPHONE_FIXE = "FIX";
public static final String TELEPHONE_GSM = "GSM";
public static final String TELEPHONE_FAX = "FAX";
/**
* Constructeur vide
/trunk/src/org/tela_botanica/client/modeles/Structure.java
61,7 → 61,7
}
public String getId() {
return (String) renvoyerValeurCorrecte("id_structure");
return renvoyerValeurCorrecte("id_structure");
}
public void setId(String idStructure) {
this.set("id_structure", idStructure);
68,7 → 68,7
}
public String getIdProjet() {
return (String) renvoyerValeurCorrecte("ce_projet");
return renvoyerValeurCorrecte("ce_projet");
}
public void setIdProjet(String idProjet) {
this.set("ce_projet", idProjet);
75,7 → 75,7
}
public String getIdMere() {
return (String) renvoyerValeurCorrecte("ce_mere");
return renvoyerValeurCorrecte("ce_mere");
}
public void setIdMere(String idMere) {
this.set("ce_mere", idMere);
82,7 → 82,7
}
public String getGuid() {
return (String) renvoyerValeurCorrecte("guid");
return renvoyerValeurCorrecte("guid");
}
public void setGuid(String guid) {
this.set("guid", guid);
89,7 → 89,7
}
public String getIdAlternatif() {
return (String) renvoyerValeurCorrecte("truk_identifiant_alternatif");
return renvoyerValeurCorrecte("truk_identifiant_alternatif");
}
public void setIdAlternatif(String idAlter) {
this.set("truk_identifiant_alternatif", idAlter);
96,7 → 96,7
}
public String getNom() {
return (String) renvoyerValeurCorrecte("nom");
return renvoyerValeurCorrecte("nom");
}
public void setNom(String nom) {
this.set("nom", nom);
103,15 → 103,15
}
public String getNomAlternatif() {
return (String) renvoyerValeurCorrecte("truk_nom_alternatif");
return renvoyerValeurCorrecte("truk_nom_alternatif");
}
public String getDescription() {
return (String) renvoyerValeurCorrecte("description");
return renvoyerValeurCorrecte("description");
}
public String getType() {
return (String) renvoyerValeurCorrecte("ce_type");
return renvoyerValeurCorrecte("ce_type");
}
public void setType(String type) {
this.set("ce_type", type);
118,7 → 118,7
}
public String getTypePrive() {
return (String) renvoyerValeurCorrecte("ce_truk_type_prive");
return renvoyerValeurCorrecte("ce_truk_type_prive");
}
public void setTypePrive(String typePrive) {
this.set("ce_truk_type_prive", typePrive);
125,7 → 125,7
}
public String getTypePublic() {
return (String) renvoyerValeurCorrecte("ce_truk_type_public");
return renvoyerValeurCorrecte("ce_truk_type_public");
}
public void setTypePublic(String typePublic) {
this.set("ce_truk_type_public", typePublic);
139,11 → 139,11
}
public String getAdresseComplement() {
return (String) renvoyerValeurCorrecte("adresse_02");
return renvoyerValeurCorrecte("adresse_02");
}
 
public String getDateFondationFormatMysql() {
return (String) renvoyerValeurCorrecte("date_fondation");
return renvoyerValeurCorrecte("date_fondation");
}
public String getDateFondationFormatLong() {
String dateFormatee = "";
155,7 → 155,7
}
public Date getDateFondation() {
Date fondationDate = null;
String fondationChaine = (String) renvoyerValeurCorrecte("date_fondation");
String fondationChaine = renvoyerValeurCorrecte("date_fondation");
if (!fondationChaine.isEmpty() && !fondationChaine.equals("0000-00-00")) {
fondationDate = DateTimeFormat.getFormat("yyyy-MM-dd").parseStrict(fondationChaine);
}
173,7 → 173,7
}
public String getCodePostal() {
return (String) renvoyerValeurCorrecte("code_postal");
return renvoyerValeurCorrecte("code_postal");
}
public void setCodePostal(String codePostal) {
this.set("code_postal", codePostal);
180,7 → 180,7
}
public String getVille() {
return (String) renvoyerValeurCorrecte("ville");
return renvoyerValeurCorrecte("ville");
}
public void setVille(String ville) {
this.set("ville", ville);
187,48 → 187,60
}
public String getRegion() {
return (String) renvoyerValeurCorrecte("region");
return getChaineDenormaliseUnique("ce_truk_region");
}
public void setRegion(String region) {
this.set("region", region);
this.set("ce_truk_region", region);
}
public String getPays() {
return (String) renvoyerValeurCorrecte("pays");
return getChaineDenormaliseUnique("ce_truk_pays");
}
public void setPays(String pays) {
this.set("pays", pays);
this.set("ce_truk_pays", pays);
}
public String getLatitude() {
return (String) renvoyerValeurCorrecte("latitude");
return renvoyerValeurCorrecte("latitude");
}
 
public String getLongitude() {
return (String) renvoyerValeurCorrecte("longitude");
return renvoyerValeurCorrecte("longitude");
}
// TELEPHONE
public String getTelephone() {
return (String) renvoyerValeurCorrecte("telephone");
return renvoyerValeurCorrecte("truk_telephone");
}
public void setTelephone(String tel) {
this.set("telephone", tel);
this.set("truk_telephone", tel);
}
// TELEPHONE FIXE
public String getTelephoneFixe() {
return getInfoDenormaliseParType(renvoyerValeurCorrecte("truk_telephone"), Personne.TELEPHONE_FIXE);
}
public void setTelephoneFixe(String fixe) {
modifierChaineDenormaliseParType("truk_telephone", Personne.TELEPHONE_FIXE, fixe);
}
//TELEPHONE FAX
public String getFax() {
return (String) renvoyerValeurCorrecte("fax");
return getInfoDenormaliseParType(renvoyerValeurCorrecte("truk_telephone"), Personne.TELEPHONE_FAX);
}
public void setFax(String fax) {
this.set("fax", fax);
modifierChaineDenormaliseParType("truk_telephone", Personne.TELEPHONE_FAX, fax);
}
// COURRIEL
public String getCourriel() {
return (String) renvoyerValeurCorrecte("courriel");
return renvoyerValeurCorrecte("courriel");
}
public void setCourriel(String courriel) {
this.set("courriel", courriel);
}
// URL
public String getUrl(String type) {
return urls.get(type);
}
275,11 → 287,11
}
public String getConditionAcces() {
return (String) renvoyerValeurCorrecte("condition_acces");
return renvoyerValeurCorrecte("condition_acces");
}
 
public String getConditionUsage() {
return (String) renvoyerValeurCorrecte("condition_usage");
return renvoyerValeurCorrecte("condition_usage");
}
public StructureAPersonneListe getPersonnel() {
/trunk/src/org/tela_botanica/client/modeles/aDonnee.java
1,6 → 1,7
package org.tela_botanica.client.modeles;
 
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
15,6 → 16,7
 
import com.extjs.gxt.ui.client.core.FastMap;
import com.extjs.gxt.ui.client.data.BaseModelData;
import com.google.gwt.core.client.GWT;
import com.google.gwt.http.client.URL;
 
/**
76,11 → 78,11
protected void supprimerTypeDansChaineDenormalise(String champ, String type) {
String chaineExistante = renvoyerValeurCorrecte(champ);
if (!chaineExistante.equals("")) {
// Si la valeur à ajouter n'est pas déjà présente, nous l'ajoutons
if (chaineExistante.matches("(^|;;)"+type+"##")) {
chaineExistante = chaineExistante.replaceFirst(type+"##", "");
chaineExistante = chaineExistante.replaceAll(";;;;", ";;");
chaineExistante = chaineExistante.replaceAll("(^;;|;;$)", "");
if (chaineExistante.matches("(?:^|.*;;)"+type+"##.*")) {
chaineExistante = chaineExistante.replaceFirst("(^|.*;;)"+type+"##.*?(;;.*|$)", "$1$2");
chaineExistante = chaineExistante.replaceAll("(.*);;;;(.*)", "$1;;$2");
chaineExistante = chaineExistante.replaceAll("^;;(.*)", "$1");
chaineExistante = chaineExistante.replaceAll("(.*);;$", "$1");
this.set(champ, chaineExistante);
}
}
206,6 → 208,7
/**
* Permet de modifier correctement une chaine dénormalisée (champ de type "truk").
* Remplace par la valeur de la première instance du type indiqué dans la chaine dénormalisée.
* Si aucun type n'est trouvé, nous en ajoutons un avec la nouvelle valeur.
*
* @param champ le nom du champ dénormalisé
* @param type le type de la valeur à modifier
212,19 → 215,31
* @param valeur la valeur pour le type en question
*/
protected void modifierChaineDenormaliseParType(String champ, String type, Object valeur) {
if (valeur instanceof String) {
if (valeur == null) {
supprimerTypeDansChaineDenormalise(champ, type);
GWT.log("Champ:"+get(champ), null);
} else if (valeur instanceof String) {
String chaineExistante = renvoyerValeurCorrecte(champ);
if (chaineExistante.equals("")) {
this.set(champ, type+"##"+valeur);
} else {
String[] valeurs = chaineExistante.split(";;");
HashMap<String,String> valeursModifiees = new HashMap<String,String>();
for (int i = 0; i < valeurs.length; i++) {
if (valeurs[i].startsWith(type+"##") || i == (valeurs.length -1)) {
valeurs[i] = type+"##"+valeur;
break;
if (valeurs[i].startsWith(type+"##")) {
valeursModifiees.put(type, type+"##"+valeur);
GWT.log("Valeur:"+valeurs[i], null);
} else if (i == (valeurs.length -1) && !valeurs[i].startsWith(type+"##")) {
valeursModifiees.put(valeurs[i].split("##")[0], valeurs[i]);
valeursModifiees.put(type, type+"##"+valeur);
} else {
valeursModifiees.put(valeurs[i].split("##")[0], valeurs[i]);
}
}
this.set(champ, UtilArray.implode(valeurs, ";;"));
String[] tableauValeursModifiees = valeursModifiees.values().toArray(new String[valeursModifiees.size()]);
this.set(champ, UtilArray.implode(tableauValeursModifiees, ";;"));
GWT.log("Chaine:"+chaineExistante+"-"+renvoyerValeurCorrecte(champ), null);
}
}
}
/trunk/src/org/tela_botanica/client/modeles/StructureAPersonne.java
1,10 → 1,8
package org.tela_botanica.client.modeles;
 
import java.util.Iterator;
import java.util.List;
import java.util.Set;
 
import com.extjs.gxt.ui.client.widget.form.CheckBox;
import com.google.gwt.json.client.JSONObject;
 
public class StructureAPersonne extends aDonnee {
22,10 → 20,10
*/
public StructureAPersonne() {
// Définition des valeurs par défaut de variables obligatoires vis à vis de l'utilisation de l'objet
this.set("contact", false);
this.set("fonction", "");
this.set("statut", "");
this.set("travail", 0);
set("contact", false);
set("fonction", "");
set("statut", "");
set("travail", 0);
}
/**
35,10 → 33,10
*/
public StructureAPersonne(JSONObject personnel) {
// Définition des valeurs par défaut de variables obligatoires vis à vis de l'utilisation de l'objet
this.set("contact", false);
this.set("fonction", "");
this.set("statut", "");
this.set("travail", 0);
set("contact", false);
set("fonction", "");
set("statut", "");
set("travail", 0);
// L'objet JSON est une table de hachage
Set<String> im = personnel.keySet();
55,11 → 53,11
if (personnel.get(cle).isString() != null) {
valeur = personnel.get(cle).isString().stringValue();
}
this.set(cleObjet, valeur);
set(cleObjet, valeur);
if (cle.equals("mark_contact")) {
this.set("contact", (valeur.equals("1") ? true : false));
set("contact", (valeur.equals("1") ? true : false));
} else if (cle.equals("bota_travail_hebdo_tps")) {
this.set("travail", Integer.parseInt(valeur));
set("travail", Integer.parseInt(valeur));
}
}
if (cle.startsWith(Personne.PREFIXE+"_")) {
72,15 → 70,15
}
if (cleObjet.equals("truk_telephone")) {
this.set("telephone", getInfoDenormaliseParType(valeur, "FIX"));
} else if (cleObjet.equals("truk_fax")) {
this.set("fax", getInfoDenormaliseParPosition(valeur, 1));
set("telephone", valeur);
set("tel_fix", getInfoDenormaliseParType(valeur, Personne.TELEPHONE_FIXE));
set("tel_fax", getInfoDenormaliseParType(valeur, Personne.TELEPHONE_FAX));
} else if (cleObjet.equals("truk_courriel")) {
this.set("courriel", getInfoDenormaliseParPosition(valeur, 1));
set("courriel", getInfoDenormaliseParPosition(valeur, 1));
} else if (cleObjet.equals("ce_truk_specialite")) {
this.set("specialite", getInfoDenormaliseParPosition(valeur, 1));
set("specialite", getInfoDenormaliseParPosition(valeur, 1));
} else {
this.set(cleObjet, valeur);
set(cleObjet, valeur);
}
}
}
97,10 → 95,10
setIdRole(roleId);
// Définition des valeurs par défaut de variables obligatoires vis à vis de l'utilisation de l'objet
this.set("contact", false);
this.set("fonction", fonction);
this.set("statut", "");
this.set("travail", 0);
set("contact", false);
set("fonction", fonction);
set("statut", "");
set("travail", 0);
}
/**
114,11 → 112,11
setIdRole(roleId);
// Définition des valeurs par défaut de variables obligatoires vis à vis de l'utilisation de l'objet
this.set("contact", false);
this.set("fonction", fonction);
this.set("statut", "");
this.set("travail", 0);
this.set("etat", codeEtat);
set("contact", false);
set("fonction", fonction);
set("statut", "");
set("travail", 0);
set("etat", codeEtat);
}
// ID
147,7 → 145,7
return renvoyerValeurCorrecte("id_structure");
}
public void setIdStructure(String is) {
this.set("id_structure", is);
set("id_structure", is);
}
// ID PERSONNE
155,7 → 153,7
return renvoyerValeurCorrecte("id_personne");
}
public void setIdPersonne(String ip) {
this.set("id_personne", ip);
set("id_personne", ip);
}
// ID RôLE
163,7 → 161,7
return renvoyerValeurCorrecte("id_role");
}
public void setIdRole(String ir) {
this.set("id_role", ir);
set("id_role", ir);
}
// FONCTION
171,7 → 169,7
return renvoyerValeurCorrecte("ce_truk_fonction");
}
public void setFonction(String ctf) {
this.set("ce_truk_fonction", ctf);
set("ce_truk_fonction", ctf);
}
public void setFonction(String type, Object valeur) {
setChaineDenormaliseUnique("ce_truk_fonction", type, valeur);
183,7 → 181,7
return renvoyerValeurCorrecte("service");
}
public void setService(String s) {
this.set("service", s);
set("service", s);
}
// STATUT
191,7 → 189,7
return renvoyerValeurCorrecte("ce_truk_statut");
}
public void setStatut(String cts) {
this.set("ce_truk_statut", cts);
set("ce_truk_statut", cts);
}
public void setStatut(String type, Object valeur) {
setChaineDenormaliseUnique("ce_truk_statut", type, valeur);
202,8 → 200,8
return renvoyerValeurCorrecte("mark_contact");
}
public void setContact(String c) {
//this.set("contact", (c.equals("1") ? true : false));
this.set("mark_contact", c);
//set("contact", (c.equals("1") ? true : false));
set("mark_contact", c);
}
public void setContact(Boolean c) {
setContact((c.equals(Boolean.TRUE) ? "1" : "0"));
214,7 → 212,7
return renvoyerValeurCorrecte("bota_travail_hebdo_tps");
}
public void setBotaTravailHebdoTps(String btht) {
this.set("bota_travail_hebdo_tps", btht);
set("bota_travail_hebdo_tps", btht);
}
//+---------------------------------------------------------------------------------------------------------------+
224,8 → 222,8
public String getPrenom() {
return renvoyerValeurCorrecte("prenom");
}
public void setPrenom(String p) {
this.set("prenom", p);
public void setPrenom(String prenom) {
set("prenom", prenom);
}
// NOM
232,8 → 230,8
public String getNom() {
return renvoyerValeurCorrecte("nom");
}
public void setNom(String n) {
this.set("nom", n);
public void setNom(String nom) {
set("nom", nom);
}
// TÉLÉPHONE
240,33 → 238,35
public String getTelephone() {
return renvoyerValeurCorrecte("telephone");
}
public void setTelephone(String t) {
public void setTelephone(String tel) {
set("telephone", tel);
}
// TÉLÉPHONE FIXE
public String getTelephoneFixe() {
return getInfoDenormaliseParType(renvoyerValeurCorrecte("telephone"), Personne.TELEPHONE_FIXE);
}
public void setTelephoneFixe(String fixe) {
// Nous remplaçons le premier numéro de Téléphone FIX de la personne
this.modifierChaineDenormaliseParType("telephone", "FIX", t);
modifierChaineDenormaliseParType("telephone", Personne.TELEPHONE_FIXE, fixe);
}
public String selectionnerTelephone(String type) {
return getInfoDenormaliseParType(renvoyerValeurCorrecte("telephone"), type);
}
// FAX
// TÉLÉPHONE FAX
public String getFax() {
return renvoyerValeurCorrecte("fax");
return getInfoDenormaliseParType(renvoyerValeurCorrecte("telephone"), Personne.TELEPHONE_FAX);
}
public void setFax(String f) {
// Nous remplaçons le numéro de Fax en position 1 (principal)
this.modifierChaineDenormaliseParPosition("fax", 1, f);
public void setFax(String fax) {
// Nous remplaçons le premier numéro de FAX de la personne
modifierChaineDenormaliseParType("telephone", Personne.TELEPHONE_FAX, fax);
}
public String selectionnerFax(int position) {
return getInfoDenormaliseParPosition(renvoyerValeurCorrecte("fax"), position);
}
// COURRIEL
public String getCourriel() {
return renvoyerValeurCorrecte("courriel");
}
public void setCourriel(String c) {
public void setCourriel(String courriel) {
// Nous remplaçons le courriel en position 1 (principal)
this.modifierChaineDenormaliseParPosition("courriel", 1, c);
this.modifierChaineDenormaliseParPosition("courriel", 1, courriel);
}
public String selectionnerCourriel(int position) {
return getInfoDenormaliseParPosition(renvoyerValeurCorrecte("courriel"), position);
276,9 → 276,9
public String getSpecialite() {
return renvoyerValeurCorrecte("specialite");
}
public void setSpecialite(String s) {
public void setSpecialite(String specialite) {
// Nous remplaçons le premier numéro de Téléphone FIX de la personne
this.setChaineDenormaliseUnique("specialite", "AUTRE", s);
setChaineDenormaliseUnique("specialite", "AUTRE", specialite);
}
public String afficherSpecialite() {
return getChaineDenormaliseUnique("specialite");
/trunk/src/org/tela_botanica/client/modeles/StructureAsyncDao.java
109,67 → 109,8
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, url);
String postDonnees = "cmhl_ce_modifier_par=" + utilisateurId +
"&cs_ce_projet=" + str.getIdProjet() +
"&cs_ce_mere=" + str.getIdMere() +
"&cs_guid=" + str.getGuid() +
"&cs_truk_identifiant_alternatif=" + str.getIdAlternatif() +
"&cs_nom=" + str.getNom() +
"&cs_truk_nom_alternatif=" + str.getNomAlternatif() +
"&cs_ce_type=" + str.getType() +
"&cs_ce_truk_type_prive=" + str.getTypePrive() +
"&cs_ce_truk_type_public=" + str.getTypePublic() +
"&cs_adresse_01=" + str.getAdresse() +
"&cs_adresse_02=" + str.getAdresseComplement() +
"&cs_date_fondation=" + str.getDateFondationFormatMysql() +
"&cs_code_postal=" + str.getCodePostal() +
"&cs_ville=" + str.getVille() +
"&cs_region=" + str.getRegion() +
"&cs_pays=" + str.getPays() +
"&cs_telephone=" + str.getTelephone() +
"&cs_fax=" + str.getFax() +
"&cs_truk_url=" + str.getUrl() +
"&cs_nbre_personne=" + Integer.toString(str.getNbrePersonne());
if (conservation != null) {
postDonnees += "&csc_mark_formation=" + conservation.getFormation() +
"&csc_formation=" + conservation.getFormationInfo() +
"&csc_mark_formation_interet=" + conservation.getFormationInteret() +
"&csc_truk_stockage_local=" + conservation.getStockageLocal() +
"&csc_truk_stockage_meuble=" + conservation.getStockageMeuble() +
"&csc_truk_stockage_parametre=" + conservation.getStockageParametre() +
"&csc_mark_collection_commune=" + conservation.getCollectionCommune() +
"&csc_truk_collection_autre=" + conservation.getCollectionAutre() +
"&csc_mark_acces_controle=" + conservation.getAccesControle() +
"&csc_mark_restauration=" + conservation.getRestauration() +
"&csc_truk_restauration_operation=" + conservation.getRestaurationOperation() +
"&csc_ce_materiel_conservation=" + conservation.getMaterielConservation() +
"&csc_truk_materiel_autre=" + conservation.getMaterielAutre() +
"&csc_mark_traitement=" + conservation.getTraitement() +
"&csc_truk_traitement=" + conservation.getTraitements() +
"&csc_mark_acquisition_collection=" + conservation.getAcquisitionCollection() +
"&csc_mark_acquisition_echantillon=" + conservation.getAcquisitionEchantillon() +
"&csc_mark_acquisition_traitement=" + conservation.getAcquisitionTraitement() +
"&csc_truk_acquisition_traitement_poison=" + conservation.getAcquisitionTraitementPoison() +
"&csc_truk_acquisition_traitement_insecte=" + conservation.getAcquisitionTraitementInsecte();
}
if (valorisation != null) {
postDonnees += "&csv_mark_action=" + valorisation.getAction() +
"&csv_truk_action=" + valorisation.getActionInfo() +
"&csv_publication=" + valorisation.getPublication() +
"&csv_collection_autre=" + valorisation.getCollectionAutre() +
"&csv_mark_action_future=" + valorisation.getActionFuture() +
"&csv_action_future=" + valorisation.getActionFutureInfo() +
"&csv_mark_recherche=" + valorisation.getRecherche() +
"&csv_truk_recherche_provenance=" + valorisation.getRechercheProvenance() +
"&csv_truk_recherche_type=" + valorisation.getRechercheType() +
"&csv_mark_acces_ss_motif=" + valorisation.getAccesSansMotif() +
"&csv_acces_ss_motif=" + valorisation.getAccesSansMotifInfo() +
"&csv_mark_visite_avec_motif=" + valorisation.getVisiteAvecMotif() +
"&csv_visite_avec_motif=" + valorisation.getVisiteAvecMotifInfo();
}
String postDonneesEncodees = construirePost(utilisateurId, str, conservation, valorisation);
String postDonneesEncodees = URL.encode(postDonnees);
try {
rb.sendRequest(postDonneesEncodees, new RequestCallback() {
 
305,70 → 246,8
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, url);
String postDonnees = "cmhl_ce_modifier_par=" + utilisateurId;
if (str != null) {
postDonnees += "&cs_ce_projet=" + str.getIdProjet() +
"&cs_ce_mere=" + str.getIdMere() +
"&cs_guid=" + str.getGuid() +
"&cs_truk_identifiant_alternatif=" + str.getIdAlternatif() +
"&cs_nom=" + str.getNom() +
"&cs_truk_nom_alternatif=" + str.getNomAlternatif() +
"&cs_ce_type=" + str.getType() +
"&cs_ce_truk_type_prive=" + str.getTypePrive() +
"&cs_ce_truk_type_public=" + str.getTypePublic() +
"&cs_adresse_01=" + str.getAdresse() +
"&cs_adresse_02=" + str.getAdresseComplement() +
"&cs_date_fondation=" + str.getDateFondationFormatMysql() +
"&cs_code_postal=" + str.getCodePostal() +
"&cs_ville=" + str.getVille() +
"&cs_region=" + str.getRegion() +
"&cs_pays=" + str.getPays() +
"&cs_telephone=" + str.getTelephone() +
"&cs_fax=" + str.getFax() +
"&cs_courriel=" + str.getCourriel() +
"&cs_truk_url=" + str.getUrl() +
"&cs_nbre_personne=" + Integer.toString(str.getNbrePersonne());
}
if (conservation != null) {
postDonnees += "&csc_mark_formation=" + conservation.getFormation() +
"&csc_formation=" + conservation.getFormationInfo() +
"&csc_mark_formation_interet=" + conservation.getFormationInteret() +
"&csc_truk_stockage_local=" + conservation.getStockageLocal() +
"&csc_truk_stockage_meuble=" + conservation.getStockageMeuble() +
"&csc_truk_stockage_parametre=" + conservation.getStockageParametre() +
"&csc_mark_collection_commune=" + conservation.getCollectionCommune() +
"&csc_truk_collection_autre=" + conservation.getCollectionAutre() +
"&csc_mark_acces_controle=" + conservation.getAccesControle() +
"&csc_mark_restauration=" + conservation.getRestauration() +
"&csc_truk_restauration_operation=" + conservation.getRestaurationOperation() +
"&csc_ce_materiel_conservation=" + conservation.getMaterielConservation() +
"&csc_truk_materiel_autre=" + conservation.getMaterielAutre() +
"&csc_mark_traitement=" + conservation.getTraitement() +
"&csc_truk_traitement=" + conservation.getTraitements() +
"&csc_mark_acquisition_collection=" + conservation.getAcquisitionCollection() +
"&csc_mark_acquisition_echantillon=" + conservation.getAcquisitionEchantillon() +
"&csc_mark_acquisition_traitement=" + conservation.getAcquisitionTraitement() +
"&csc_truk_acquisition_traitement_poison=" + conservation.getAcquisitionTraitementPoison() +
"&csc_truk_acquisition_traitement_insecte=" + conservation.getAcquisitionTraitementInsecte();
}
if (valorisation != null) {
postDonnees += "&csv_mark_action=" + valorisation.getAction() +
"&csv_truk_action=" + valorisation.getActionInfo() +
"&csv_publication=" + valorisation.getPublication() +
"&csv_collection_autre=" + valorisation.getCollectionAutre() +
"&csv_mark_action_future=" + valorisation.getActionFuture() +
"&csv_action_future=" + valorisation.getActionFutureInfo() +
"&csv_mark_recherche=" + valorisation.getRecherche() +
"&csv_truk_recherche_provenance=" + valorisation.getRechercheProvenance() +
"&csv_truk_recherche_type=" + valorisation.getRechercheType() +
"&csv_mark_acces_ss_motif=" + valorisation.getAccesSansMotif() +
"&csv_acces_ss_motif=" + valorisation.getAccesSansMotifInfo() +
"&csv_mark_visite_avec_motif=" + valorisation.getVisiteAvecMotif() +
"&csv_visite_avec_motif=" + valorisation.getVisiteAvecMotifInfo();
}
String postDonneesEncodees = URL.encode(postDonnees);
GWT.log(postDonnees, null);
String postDonneesEncodees = construirePost(utilisateurId, str, conservation, valorisation);
GWT.log(postDonneesEncodees, null);
try {
rb.sendRequest(postDonneesEncodees, new RequestCallback() {
425,4 → 304,67
Info.display("Erreur de Requête", "Une erreur s'est produite lors de la création de la requête.");
}
}
private String construirePost(String utilisateurId, Structure str, StructureConservation conservation, StructureValorisation valorisation) {
String postDonnees = "cmhl_ce_modifier_par=" + URL.encodeComponent(utilisateurId);
if (str != null) {
postDonnees += "&cs_ce_projet=" + URL.encodeComponent(str.getIdProjet()) +
"&cs_ce_mere=" + URL.encodeComponent(str.getIdMere()) +
"&cs_guid=" + URL.encodeComponent(str.getGuid()) +
"&cs_truk_identifiant_alternatif=" + URL.encodeComponent(str.getIdAlternatif()) +
"&cs_nom=" + URL.encodeComponent(str.getNom()) +
"&cs_truk_nom_alternatif=" + URL.encodeComponent(str.getNomAlternatif()) +
"&cs_ce_type=" + URL.encodeComponent(str.getType()) +
"&cs_ce_truk_type_prive=" + URL.encodeComponent(str.getTypePrive()) +
"&cs_ce_truk_type_public=" + URL.encodeComponent(str.getTypePublic()) +
"&cs_adresse_01=" + URL.encodeComponent(str.getAdresse()) +
"&cs_adresse_02=" + URL.encodeComponent(str.getAdresseComplement()) +
"&cs_date_fondation=" + URL.encodeComponent(str.getDateFondationFormatMysql()) +
"&cs_code_postal=" + URL.encodeComponent(str.getCodePostal()) +
"&cs_ville=" + URL.encodeComponent(str.getVille()) +
"&cs_ce_truk_region=" + URL.encodeComponent(str.getRegion()) +
"&cs_ce_truk_pays=" + URL.encodeComponent(str.getPays()) +
"&cs_truk_telephone=" + URL.encodeComponent(str.getTelephone()) +
"&cs_truk_url=" + URL.encodeComponent(str.getUrl()) +
"&cs_nbre_personne=" + URL.encodeComponent(Integer.toString(str.getNbrePersonne()));
}
if (conservation != null) {
postDonnees += "&csc_mark_formation=" + URL.encodeComponent(conservation.getFormation()) +
"&csc_formation=" + URL.encodeComponent(conservation.getFormationInfo()) +
"&csc_mark_formation_interet=" + URL.encodeComponent(conservation.getFormationInteret()) +
"&csc_truk_stockage_local=" + URL.encodeComponent(conservation.getStockageLocal()) +
"&csc_truk_stockage_meuble=" + URL.encodeComponent(conservation.getStockageMeuble()) +
"&csc_truk_stockage_parametre=" + URL.encodeComponent(conservation.getStockageParametre()) +
"&csc_mark_collection_commune=" + URL.encodeComponent(conservation.getCollectionCommune()) +
"&csc_truk_collection_autre=" + URL.encodeComponent(conservation.getCollectionAutre()) +
"&csc_mark_acces_controle=" + URL.encodeComponent(conservation.getAccesControle()) +
"&csc_mark_restauration=" + URL.encodeComponent(conservation.getRestauration()) +
"&csc_truk_restauration_operation=" + URL.encodeComponent(conservation.getRestaurationOperation()) +
"&csc_ce_materiel_conservation=" + URL.encodeComponent(conservation.getMaterielConservation()) +
"&csc_truk_materiel_autre=" + URL.encodeComponent(conservation.getMaterielAutre()) +
"&csc_mark_traitement=" + URL.encodeComponent(conservation.getTraitement()) +
"&csc_truk_traitement=" + URL.encodeComponent(conservation.getTraitements()) +
"&csc_mark_acquisition_collection=" + URL.encodeComponent(conservation.getAcquisitionCollection()) +
"&csc_mark_acquisition_echantillon=" + URL.encodeComponent(conservation.getAcquisitionEchantillon()) +
"&csc_mark_acquisition_traitement=" + URL.encodeComponent(conservation.getAcquisitionTraitement()) +
"&csc_truk_acquisition_traitement_poison=" + URL.encodeComponent(conservation.getAcquisitionTraitementPoison()) +
"&csc_truk_acquisition_traitement_insecte=" + URL.encodeComponent(conservation.getAcquisitionTraitementInsecte());
}
if (valorisation != null) {
postDonnees += "&csv_mark_action=" + URL.encodeComponent(valorisation.getAction()) +
"&csv_truk_action=" + URL.encodeComponent(valorisation.getActionInfo()) +
"&csv_publication=" + URL.encodeComponent(valorisation.getPublication()) +
"&csv_collection_autre=" + URL.encodeComponent(valorisation.getCollectionAutre()) +
"&csv_mark_action_future=" + URL.encodeComponent(valorisation.getActionFuture()) +
"&csv_action_future=" + URL.encodeComponent(valorisation.getActionFutureInfo()) +
"&csv_mark_recherche=" + URL.encodeComponent(valorisation.getRecherche()) +
"&csv_truk_recherche_provenance=" + URL.encodeComponent(valorisation.getRechercheProvenance()) +
"&csv_truk_recherche_type=" + URL.encodeComponent(valorisation.getRechercheType()) +
"&csv_mark_acces_ss_motif=" + URL.encodeComponent(valorisation.getAccesSansMotif()) +
"&csv_acces_ss_motif=" + URL.encodeComponent(valorisation.getAccesSansMotifInfo()) +
"&csv_mark_visite_avec_motif=" + URL.encodeComponent(valorisation.getVisiteAvecMotif()) +
"&csv_visite_avec_motif=" + URL.encodeComponent(valorisation.getVisiteAvecMotifInfo());
}
return postDonnees;
}
}
/trunk/src/org/tela_botanica/client/Mediateur.java
73,10 → 73,6
private Rafraichissable contenuPanneauCentre = null;
private IdentificationFenetre fenetreIdentification = null;
private StructureVue structureVue = null;
private CollectionVue collectionVue = null;
private PersonneVue personneVue = null;
private PublicationVue publicationVue = null;
public Mediateur() {
// Enregistrement du Médiateur dans le Registre
351,9 → 347,7
//+----------------------------------------------------------------------------------------------------------------+
 
public void afficherListeStructures(StructureListe structuresACharger) {
if (structureVue == null) {
structureVue = new StructureVue(this);
}
StructureVue structureVue = new StructureVue(this);
contenuPanneauCentre = structureVue;
panneauCentre.add(structureVue);
panneauCentre.setId(ComposantId.PANNEAU_STRUCTURE_LISTE);
489,9 → 483,7
//+----------------------------------------------------------------------------------------------------------------+
public void afficherListeCollections(CollectionListe collectionsACharger) {
if (collectionVue == null) {
collectionVue = new CollectionVue(this);
}
CollectionVue collectionVue = new CollectionVue(this);
panneauCentre.add(collectionVue);
panneauCentre.setId(ComposantId.PANNEAU_COLLECTION_LISTE);
contenuPanneauCentre = collectionVue;
642,9 → 634,7
//+----------------------------------------------------------------------------------------------------------------+
 
public void afficherListePublication(PublicationListe nouvelleDonnees) {
if (publicationVue == null) {
publicationVue = new PublicationVue(this) ;
}
PublicationVue publicationVue = new PublicationVue(this) ;
panneauCentre.removeAll();
panneauCentre.add(publicationVue);
contenuPanneauCentre = publicationVue;
/trunk/src/org/tela_botanica/client/vues/DetailVue.java
34,7 → 34,7
public DetailVue(Mediateur mediateurCourant) {
mediateur = mediateurCourant;
i18nC = mediateur.i18nC;
i18nC = Mediateur.i18nC;
initialiserSautLigneTpl();
/trunk/src/org/tela_botanica/client/vues/StructureForm.java
121,7 → 121,7
private HiddenField<String> idStructureChp = null;
// Onglet IDENTIFICATION
private Structure identification;
private Structure identification = null;
private ListStore<Valeur> magazinLstpr = null;
private ComboBox<Valeur> comboLstpr = null;
private ListStore<Valeur> magazinLstpu = null;
134,21 → 134,21
private TextField<String> ihChp = null;
private TextField<String> mnhnChp = null;
private ComboBox<InterneValeur> comboTypeStructure = null;
private TextField<String> nomStructureChp;
private DateField dateFondationChp;
private TextArea adrChp;
private TextField<String> cpChp;
private TextField<String> villeChp;
private TextField<String> regionChp;
private TextField<String> telChp;
private TextField<String> faxChp;
private TextField<String> emailChp;
private TextField<String> urlChp;
private ListStore<Valeur> magazinPays;
private ComboBox<Valeur> comboPays;
private TextField<String> nomStructureChp = null;
private DateField dateFondationChp = null;
private TextArea adrChp = null;
private TextField<String> cpChp = null;
private TextField<String> villeChp = null;
private TextField<String> regionChp = null;
private TextField<String> telChp = null;
private TextField<String> faxChp = null;
private TextField<String> emailChp = null;
private TextField<String> urlChp = null;
private ListStore<Valeur> magazinPays = null;
private ComboBox<Valeur> comboPays = null;
 
// Onglet PERSONNEL
private StructureAPersonneListe personnel;
private StructureAPersonneListe personnel = null;
private StructureAPersonneListe personnelAjoute = null;
private StructureAPersonneListe personnelModifie = null;
private StructureAPersonneListe personnelSupprime = null;
158,27 → 158,27
// Onglet CONSERVATION
private StructureConservation conservation = null;
private RadioGroup formationMarkRGrpChp;
private RadioGroup interetFormationMarkRGrpChp;
private RadioGroup collectionCommuneMarkRGrpChp;
private RadioGroup accesControleMarkRGrpChp;
private RadioGroup restaurationMarkRGrpChp;
private RadioGroup traitementMarkRGrpChp;
private RadioGroup collectionAcquisitionMarkRGrpChp;
private RadioGroup echantillonAcquisitionMarkRGrpChp;
private TextField<String> localStockageAutreChp;
private TextField<String> meubleStockageAutreChp;
private TextField<String> parametreStockageAutreChp;
private TextField<String> collectionAutreAutreChp;
private TextField<String> autreCollectionAutreChp;
private TextField<String> opRestauAutreChp;
private TextField<String> autreMaterielAutreChp;
private TextField<String> poisonTraitementAutreChp;
private TextField<String> traitementAutreChp;
private TextField<String> insecteTraitementAutreChp;
private TextField<String> actionAutreChp;
private TextField<String> provenanceRechercheAutreChp;
private TextField<String> typeRechercheAutreChp;
private RadioGroup formationMarkRGrpChp = null;
private RadioGroup interetFormationMarkRGrpChp = null;
private RadioGroup collectionCommuneMarkRGrpChp = null;
private RadioGroup accesControleMarkRGrpChp = null;
private RadioGroup restaurationMarkRGrpChp = null;
private RadioGroup traitementMarkRGrpChp = null;
private RadioGroup collectionAcquisitionMarkRGrpChp = null;
private RadioGroup echantillonAcquisitionMarkRGrpChp = null;
private TextField<String> localStockageAutreChp = null;
private TextField<String> meubleStockageAutreChp = null;
private TextField<String> parametreStockageAutreChp = null;
private TextField<String> collectionAutreAutreChp = null;
private TextField<String> autreCollectionAutreChp = null;
private TextField<String> opRestauAutreChp = null;
private TextField<String> autreMaterielAutreChp = null;
private TextField<String> poisonTraitementAutreChp = null;
private TextField<String> traitementAutreChp = null;
private TextField<String> insecteTraitementAutreChp = null;
private TextField<String> actionAutreChp = null;
private TextField<String> provenanceRechercheAutreChp = null;
private TextField<String> typeRechercheAutreChp = null;
private CheckBoxGroup localStockageTrukCacGrpChp = null;
private LayoutContainer localStockageTrukCp = null;
private CheckBoxGroup meubleStockageTrukCacGrpChp = null;
216,20 → 216,20
private RadioGroup actionMarkRGrpChp = null;
private LayoutContainer actionTrukCp = null;
private CheckBoxGroup actionTrukCacGrpChp = null;
private RadioGroup futureActionMarkRGrpChp;
private RadioGroup rechercheMarkRGrpChp;
private RadioGroup sansMotifAccesMarkRGrpChp;
private RadioGroup avecMotifAccesMarkRGrpChp;
private TextField<String> publicationChp;
private LayoutContainer materielConservationCp;
private ListStore<Personne> personneExistanteMagazin;
private ComboBox<Personne> personneExistanteCombo;
private Button supprimerPersonnelBtn;
private ListStore<Projet> projetsMagazin;
private ComboBox<Projet> projetsCombo;
private CellEditor fonctionEditor;
private List<Valeur> fonctionsListe;
private ButtonBar barreOutilsValidation;
private RadioGroup futureActionMarkRGrpChp = null;
private RadioGroup rechercheMarkRGrpChp = null;
private RadioGroup sansMotifAccesMarkRGrpChp = null;
private RadioGroup avecMotifAccesMarkRGrpChp = null;
private TextField<String> publicationChp = null;
private LayoutContainer materielConservationCp = null;
private ListStore<Personne> personneExistanteMagazin = null;
private ComboBox<Personne> personneExistanteCombo = null;
private Button supprimerPersonnelBtn = null;
private ListStore<Projet> projetsMagazin = null;
private ComboBox<Projet> projetsCombo = null;
private CellEditor fonctionEditor = null;
private List<Valeur> fonctionsListe = null;
private ButtonBar barreOutilsValidation = null;
 
 
public StructureForm(Mediateur mediateurCourrant, String modeDeCreation) {
345,7 → 345,6
private void soumettreFormulaire() {
// Vérification de la validité des champs du formulaire
if (verifierFormulaire()) {
GWT.log("Soumission du formulaire", null);
// Collecte des données du formulaire
Structure structure = collecterStructureIdentification();
StructureConservation conservation = collecterStructureConservation();
459,16 → 458,16
// RECHERCHE
if (rechercheMarkRGrpChp.getValue() != null) {
valorisationCollectee.setRecherche(rechercheMarkRGrpChp.getValue().getValueAttribute());
 
// RECHERCHE PROVENANCE
valorisationCollectee.setRechercheProvenance(creerChaineDenormalisee(provenanceRechercheTrukCacGrpChp.getValues()));
valorisationCollectee.setRechercheProvenance("AUTRE", provenanceRechercheAutreChp.getValue());
// RECHERCHE TYPE
valorisationCollectee.setRechercheType(creerChaineDenormalisee(typeRechercheTrukCacGrpChp.getValues()));
valorisationCollectee.setRechercheType("AUTRE", typeRechercheAutreChp.getValue());
}
// RECHERCHE PROVENANCE
valorisationCollectee.setRechercheProvenance(creerChaineDenormalisee(provenanceRechercheTrukCacGrpChp.getValues()));
valorisationCollectee.setRechercheProvenance("AUTRE", provenanceRechercheAutreChp.getValue());
// RECHERCHE TYPE
valorisationCollectee.setRechercheType(creerChaineDenormalisee(typeRechercheTrukCacGrpChp.getValues()));
valorisationCollectee.setRechercheType("AUTRE", typeRechercheAutreChp.getValue());
// ACCÈS SANS MOTIF
if (sansMotifAccesMarkRGrpChp.getValue() != null) {
valorisationCollectee.setAccesSansMotif(sansMotifAccesMarkRGrpChp.getValue().getValueAttribute());
738,7 → 737,7
structureCollectee.setPays(comboPays.getRawValue());
}
structureCollectee.setTelephone(telChp.getValue());
structureCollectee.setTelephoneFixe(telChp.getValue());
structureCollectee.setFax(faxChp.getValue());
structureCollectee.setCourriel(emailChp.getValue());
structureCollectee.setUrl(Structure.URL_SITE, urlChp.getValue());
807,7 → 806,7
comboPays.setRawValue(identification.getPays());
}
telChp.setValue(identification.getTelephone());
telChp.setValue(identification.getTelephoneFixe());
faxChp.setValue(identification.getFax());
emailChp.setValue(identification.getCourriel());
urlChp.setValue(identification.getUrl("WEB"));
1089,6 → 1088,8
} else {
personne.setFonction("AUTRE", fonction);
}
} else {
personne.setFonction("");
}
// Gestion de la notion de "contact"
1106,36 → 1107,28
} else {
personne.setStatut("AUTRE", statut);
}
} else {
personne.setStatut("");
}
// Gestion du temps de travail
if (personne.get("travail") != null && !personne.get("travail").equals(0)) {
personne.setBotaTravailHebdoTps(personne.get("travail").toString());
}
personne.setBotaTravailHebdoTps(personne.get("travail").toString());
// Gestion du téléphone
String telephone = personne.get("telephone");
if (telephone != null && !telephone.equals("")) {
personne.setTelephone(telephone);
}
String telephoneFixe = personne.get("tel_fix");
personne.setTelephoneFixe(telephoneFixe);
// Gestion du fax
String fax = personne.get("fax");
if (fax != null && !fax.equals("")) {
personne.setFax(fax);
}
String fax = personne.get("tel_fax");
personne.setFax(fax);
// Gestion du courriel
String courriel = personne.get("courriel");
if (courriel != null && !courriel.equals("")) {
personne.setCourriel(courriel);
}
personne.setCourriel(courriel);
// Gestion de la sépcialité
// Gestion de la spécialité
String specialite = personne.get("specialite");
if (specialite != null && !specialite.equals("")) {
personne.setSpecialite(specialite);
}
personne.setSpecialite(specialite);
// Ajout de la personne dans la liste correspondant à son état (ajouté ou modifié)
if (personne.get("etat") != null && personne.get("etat").equals("A")) {// Une personne ajoutée
1158,7 → 1151,6
// Gestion de la fonction
if (fonctionsMagazin != null && !((String) personnel.get(index).getFonction()).startsWith("AUTRE##")) {
GWT.log(personnel.get(index).getFonction(), null);
if (fonctionsMagazin.findModel("id_valeur", personnel.get(index).getFonction()) != null) {
personnel.get(index).set("fonction", fonctionsMagazin.findModel("id_valeur", personnel.get(index).getFonction()).getNom());
}
1263,7 → 1255,6
if (valeur != null) {
String chaineTransmise = (String) valeur;
GWT.log("ici:"+fonctionsMagazin.getCount(), null);
if (fonctionsMagazin.getCount() == 0 && fonctionsListe != null) {
fonctionsMagazin.add(fonctionsListe);
}
1283,9 → 1274,7
public Object postProcessValue(Object valeur) {
String retour = "";
Valeur fonctionTrouvee = null;
GWT.log("ICI ", null);
if (valeur == null) {
GWT.log(this.getField().getRawValue(), null);
String valeurBrute = this.getField().getRawValue();
if (fonctionsMagazin.getCount() == 0 && fonctionsListe != null) {
fonctionsMagazin.add(fonctionsListe);
1325,12 → 1314,12
column.setEditor(new CellEditor(nomChp));
configs.add(column);
 
column = new ColumnConfig("telephone", "Téléphone fixe", 100);
column = new ColumnConfig("tel_fix", "Téléphone fixe", 100);
TextField<String> telChp = new TextField<String>();
column.setEditor(new CellEditor(telChp));
configs.add(column);
 
column = new ColumnConfig("fax", "Fax", 100);
column = new ColumnConfig("tel_fax", "Fax", 100);
TextField<String> faxChp = new TextField<String>();
column.setEditor(new CellEditor(faxChp));
configs.add(column);
1357,7 → 1346,6
if (value == null) {
return value;
}
//GWT.log("pre : "+value.toString(), null);
return comboLiStatut.getStore().findModel("nom", (String) value);
}
1366,7 → 1354,6
if (value == null) {
return value;
}
//GWT.log("post : "+value.toString(), null);
return ((Valeur) value).get("nom");
}
};
1480,7 → 1467,6
membreDuPersonnel.setNom(personneExistante.getNom());
membreDuPersonnel.setPrenom(personneExistante.getPrenom());
membreDuPersonnel.setTelephone(personneExistante.getTelephone());
membreDuPersonnel.setFax(personneExistante.getFax());
membreDuPersonnel.setCourriel(personneExistante.getCourriel());
membreDuPersonnel.setSpecialite(personneExistante.getSpecialite());
1791,7 → 1777,7
telChp = new TextField<String>();
telChp.setTabIndex(tabIndex++);
telChp.setFieldLabel("Téléphone");
telChp.setFieldLabel("Téléphone fixe");
gaucheFdTelMail.add(telChp, new FormData("95%"));
faxChp = new TextField<String>();
2132,7 → 2118,6
liste.add(personnes.get(it.next()));
}
GWT.log("Nbre de personnes trouvées :"+personnes.size(), null);
personneExistanteMagazin.removeAll();
personneExistanteMagazin.add(liste);
personneExistanteCombo.setStore(personneExistanteMagazin);
2293,11 → 2278,11
if (!personnel.getNom().equals("")) {
record.set("nom", personnel.getNom());
}
if (!personnel.getTelephone().equals("")) {
record.set("telephone", personnel.selectionnerTelephone(Personne.TELEPHONE_FIXE));
if (!personnel.getTelephoneFixe().equals("")) {
record.set("tel_fix", personnel.getTelephoneFixe());
}
if (!personnel.getFax().equals("")) {
record.set("fax", personnel.selectionnerFax(1));
record.set("tel_fax", personnel.getFax());
}
if (!personnel.getCourriel().equals("")) {
record.set("courriel", personnel.selectionnerCourriel(1));
/trunk/src/org/tela_botanica/client/vues/StructureDetailVue.java
158,25 → 158,25
identificationParams.set("i18n_titre_administratif", i18nC.titreAdministratif());
identificationParams.set("i18n_acronyme", i18nC.acronyme());
identificationParams.set("i18n_statut", i18nC.statut());
identificationParams.set("i18n_date_fondation", mediateur.i18nC.dateFondation());
identificationParams.set("i18n_nbre_personnel", mediateur.i18nC.nbrePersonnel());
identificationParams.set("i18n_date_fondation", i18nC.dateFondation());
identificationParams.set("i18n_nbre_personnel", i18nC.nbrePersonnel());
identificationParams.set("i18n_titre_description", mediateur.i18nC.description());
identificationParams.set("i18n_description", mediateur.i18nC.description());
identificationParams.set("i18n_titre_description", i18nC.description());
identificationParams.set("i18n_description", i18nC.description());
identificationParams.set("i18n_titre_adresse", mediateur.i18nC.adresse());
identificationParams.set("i18n_adresse", mediateur.i18nC.adresse());
identificationParams.set("i18n_cp", mediateur.i18nC.codePostal());
identificationParams.set("i18n_ville", mediateur.i18nC.ville());
identificationParams.set("i18n_region", mediateur.i18nC.region());
identificationParams.set("i18n_pays", mediateur.i18nC.pays());
identificationParams.set("i18n_titre_adresse", i18nC.adresse());
identificationParams.set("i18n_adresse", i18nC.adresse());
identificationParams.set("i18n_cp", i18nC.codePostal());
identificationParams.set("i18n_ville", i18nC.ville());
identificationParams.set("i18n_region", i18nC.region());
identificationParams.set("i18n_pays", i18nC.pays());
identificationParams.set("i18n_titre_communication", mediateur.i18nC.titreCommunication());
identificationParams.set("i18n_tel", mediateur.i18nC.telephone());
identificationParams.set("i18n_fax", mediateur.i18nC.fax());
identificationParams.set("i18n_courriel", mediateur.i18nC.courriel());
identificationParams.set("i18n_acces", mediateur.i18nC.acces());
identificationParams.set("i18n_web", mediateur.i18nC.siteWeb());
identificationParams.set("i18n_titre_communication", i18nC.titreCommunication());
identificationParams.set("i18n_tel", i18nC.telephone());
identificationParams.set("i18n_fax", i18nC.fax());
identificationParams.set("i18n_courriel", i18nC.courriel());
identificationParams.set("i18n_acces", i18nC.acces());
identificationParams.set("i18n_web", i18nC.siteWeb());
 
String acronyme = construireTxtTruck(structure.getIdAlternatif());
String typePrive = construireTxtListeOntologie(structure.getTypePrive());
197,7 → 197,7
identificationParams.set("region", structure.getRegion());
identificationParams.set("pays", pays);
identificationParams.set("tel", structure.getTelephone());
identificationParams.set("tel", structure.getTelephoneFixe());
identificationParams.set("fax", structure.getFax());
identificationParams.set("courriel", structure.getCourriel());
identificationParams.set("acces", structure.getConditionAcces());
236,9 → 236,11
contenuParams.set("i18n_contact", i18nC.boolContact());
String lignesPersonnel = "";
Iterator<String> it = personnel.keySet().iterator();
while (it.hasNext()) {
StructureAPersonne personne = personnel.get(it.next());
GWT.log(personne.toString(), null);
Params ligneParams = new Params();
String fonction = construireTxtListeOntologie(personne.getFonction());
248,8 → 250,9
ligneParams.set("fonction", fonction);
ligneParams.set("prenom", personne.getPrenom());
ligneParams.set("nom", personne.getNom());
ligneParams.set("tel", personne.getTelephone());
ligneParams.set("fax", personne.getFax());
GWT.log("Personne:"+personne.getNom()+"::"+personne.getTelephone(), null);
ligneParams.set("tel_fix", personne.getTelephoneFixe());
ligneParams.set("tel_fax", personne.getFax());
ligneParams.set("courriel", personne.getCourriel());
ligneParams.set("statut", statut);
ligneParams.set("tps_w", personne.getBotaTravailHebdoTps());
521,8 → 524,8
" <td>{fonction}</td>"+
" <td>{prenom}</td>"+
" <td>{nom}</td>"+
" <td>{tel}</td>" +
" <td>{fax}</td>" +
" <td>{tel_fix}</td>" +
" <td>{tel_fax}</td>" +
" <td>{courriel}</td>" +
" <td>{statut}</td>" +
" <td>{tps_w}</td>" +