Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 182 → Rev 183

/trunk/src/org/tela_botanica/client/vues/PersonneDetailPanneauVue.java
3,6 → 3,8
import org.tela_botanica.client.RegistreId;
import org.tela_botanica.client.interfaces.Rafraichissable;
import org.tela_botanica.client.modeles.Personne;
import org.tela_botanica.client.modeles.Projet;
import org.tela_botanica.client.modeles.ProjetsListeAsyncDao;
import org.tela_botanica.client.modeles.Structure;
import org.tela_botanica.client.modeles.StructureListe;
 
13,19 → 15,17
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.Html;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Window;
 
public class PersonneDetailPanneauVue extends ContentPanel implements Rafraichissable {
 
private ContentPanel content;
private Html header;
private String enteteHTML = "<div class='coel-detail'><h1>{0}</h1><h2>{1}</h2></div>";
private String contenuHTML = ""; //<div style='padding: 12px;'><h2>Renseignements administratifs</h2><span style='font-weight:bold;'>Condition d'accès :</span> {9}<br /><span style='font-weight:bold;'>Adresse :</span> {1}, {2} {3}, {4}, {5}<br /><span style='font-weight:bold;'>Téléphone :</span> {6}<br /><span style='font-weight:bold;'>Fax :</span> {7}<br /><span style='font-weight:bold;'>Courriel :</span> {8}<br />{0}</div>";
private String enteteHTML = "<div class='coel-detail'><h1>{0}</h1><h2><a href=\"mailto:{1}\">{1}</a></h2></div>";
private String contenuHTML = "<div style='padding: 12px;'><p>{0}</p><b>Adresse: </b>{1}<br />{2}<br /></div>";
private String structureNom = null;
private String structureVille = null;
private String structureDescription = null;
 
public PersonneDetailPanneauVue() {
Registry.register(RegistreId.PANNEAU_PERSONNE_DETAIL, this);
44,35 → 44,32
add(content);
}
 
public void ajouterParam(Params parametres, String nomChamp, Personne personne) {
parametres.add(personne.obtenirValeurChamp(nomChamp));
//return parametres;
}
public void afficherDetailPersonne(Personne personne) {
if (personne != null) {
content.removeAll();
/*structureNom = structure.getNom();
structureVille = structure.getVille();
structureDescription = structure.getDescription();
//Header
Params enteteParams = new Params();
enteteParams.add(structureNom);
enteteParams.add(structureVille);
 
String eHtml = Format.substitute(enteteHTML, enteteParams);
header.getElement().setInnerHTML(eHtml);
 
ajouterParam(enteteParams, "fmt_nom_complet", personne);
ajouterParam(enteteParams, "truk_courriel", personne);
header.getElement().setInnerHTML(Format.substitute(enteteHTML, enteteParams));
//Contenu
Params contenuParams = new Params();
contenuParams.add(structureDescription);
contenuParams.add(structure.getAdresse());
contenuParams.add(structure.getCodePostal());
contenuParams.add(structure.getVille());
contenuParams.add(structure.getRegion());
contenuParams.add(structure.getPays());
contenuParams.add(structure.getTelephone());
contenuParams.add(structure.getFax());
contenuParams.add(structure.getCourriel());
contenuParams.add(structure.getConditionAcces());
ajouterParam(contenuParams, "description", personne);
String cHtml = Format.substitute(contenuHTML, contenuParams);
content.addText(cHtml);
*/
ajouterParam(contenuParams, "adresse_01", personne);
ajouterParam(contenuParams, "adresse_02", personne);
content.addText(Format.substitute(contenuHTML, contenuParams));
 
layout();
} else {
header.setHtml("");
80,22 → 77,16
}
}
 
public void rafraichir(Object nouvellesDonnees) {
if (nouvellesDonnees instanceof Personne) {
afficherDetailPersonne((Personne) nouvellesDonnees);
}
/*if (nouvelleDonnees instanceof Structure) {
afficherDetailInstitution((Structure) nouvelleDonnees);
public void rafraichir(Object nouvelleDonnees) {
if (nouvelleDonnees instanceof Personne) {
afficherDetailPersonne((Personne) nouvelleDonnees);
} else if (nouvelleDonnees instanceof StructureListe) {
StructureListe listeInstitutions = (StructureListe) nouvelleDonnees;
// Test pour savoir si la liste contient des éléments
if (listeInstitutions.size() == 0) {
afficherDetailInstitution(null);
afficherDetailPersonne(null);
}
}*/
}
}
 
}
/trunk/src/org/tela_botanica/client/vues/PersonneVue.java
34,6 → 34,7
}
 
public void rafraichir(Object nouvelleDonnees) {
System.out.println("RAFF");
if (nouvelleDonnees instanceof PersonneListe) {
remplirListe((PersonneListe) nouvelleDonnees);
} else {
45,7 → 46,7
LayoutContainer panneauCentre = (LayoutContainer) Registry.get(RegistreId.PANNEAU_CENTRE);
panneauPersonneListe.rafraichir(listeInstitutions);
//panneauInstitutionDetail.rafraichir(listeInstitutions);*/
//panneauInstitutionDetail.rafraichir(listeInstitutions);
panneauCentre.layout();
}