Subversion Repositories eFlore/Applications.coel

Rev

Rev 1078 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1078 Rev 1088
Line 1... Line 1...
1
package org.tela_botanica.client.vues;
1
package org.tela_botanica.client.vues;
Line -... Line 2...
-
 
2
 
-
 
3
import java.util.List;
2
 
4
 
3
import org.tela_botanica.client.Mediateur;
5
import org.tela_botanica.client.Mediateur;
4
import org.tela_botanica.client.RegistreId;
6
import org.tela_botanica.client.RegistreId;
5
import org.tela_botanica.client.i18n.Constantes;
7
import org.tela_botanica.client.i18n.Constantes;
6
import org.tela_botanica.client.interfaces.Rafraichissable;
8
import org.tela_botanica.client.interfaces.Rafraichissable;
Line 61... Line 63...
61
		});
63
		});
Line 62... Line 64...
62
	    
64
	    
63
	    add(listeProjets);
65
	    add(listeProjets);
Line 64... Line 66...
64
	}
66
	}
65
	
67
	
66
	private void afficherListeProjets(ProjetListe projetsRecus) {
68
	private void afficherListeProjets(List projetsRecus) {
67
		projets.removeAll();
69
		projets.removeAll();
68
		projets.add(projetsRecus.toList());
70
		projets.add(projetsRecus);
69
		listeProjets.setStore(projets);
71
		listeProjets.setStore(projets);
Line 70... Line 72...
70
		layout();
72
		layout();
71
	}
73
	}
72
	
74
	
73
	@Override
75
	@Override
74
	public void rafraichir(Object nouvellesDonnees) {
76
	public void rafraichir(Object nouvellesDonnees) {
-
 
77
		if (nouvellesDonnees instanceof ProjetListe) {
-
 
78
			projetsCache = (ProjetListe) nouvellesDonnees;
-
 
79
			Registry.register(RegistreId.PROJETS, projetsCache);
-
 
80
			afficherListeProjets(projetsCache.toList());
75
		if (nouvellesDonnees instanceof ProjetListe) {
81
		} else if (nouvellesDonnees instanceof List) {
76
			projetsCache = (ProjetListe) nouvellesDonnees;
82
			List<Projet> projets = (List) nouvellesDonnees;
77
			Registry.register(RegistreId.PROJETS, projetsCache);
83
			Registry.register(RegistreId.PROJETS, projets);
78
			afficherListeProjets(projetsCache);
84
			afficherListeProjets(projets);
79
		} else {
85
		} else {
80
			GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
86
			GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
81
		}		
87
		}