Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 990 Rev 1049
Line 16... Line 16...
16
import org.tela_botanica.client.modeles.Valeur;
16
import org.tela_botanica.client.modeles.Valeur;
17
import org.tela_botanica.client.modeles.ValeurListe;
17
import org.tela_botanica.client.modeles.ValeurListe;
18
import org.tela_botanica.client.modeles.aDonnee;
18
import org.tela_botanica.client.modeles.aDonnee;
19
import org.tela_botanica.client.modeles.commentaire.Commentaire;
19
import org.tela_botanica.client.modeles.commentaire.Commentaire;
20
import org.tela_botanica.client.modeles.commentaire.CommentaireListe;
20
import org.tela_botanica.client.modeles.commentaire.CommentaireListe;
-
 
21
import org.tela_botanica.client.modeles.structure.StructureListe;
21
import org.tela_botanica.client.util.Debug;
22
import org.tela_botanica.client.util.Debug;
-
 
23
import org.tela_botanica.client.vues.BarrePaginationVue;
Line 22... Line 24...
22
 
24
 
23
import com.extjs.gxt.ui.client.Registry;
25
import com.extjs.gxt.ui.client.Registry;
24
import com.extjs.gxt.ui.client.Style.SortDir;
26
import com.extjs.gxt.ui.client.Style.SortDir;
25
import com.extjs.gxt.ui.client.event.BaseEvent;
27
import com.extjs.gxt.ui.client.event.BaseEvent;
Line 59... Line 61...
59
	
61
	
60
	private Button ajouter;
62
	private Button ajouter;
61
	private Button modifier;
63
	private Button modifier;
Line -... Line 64...
-
 
64
	private Button supprimer;
-
 
65
	
62
	private Button supprimer;
66
	private BarrePaginationVue pagination = null;
63
	
67
	
Line 64... Line 68...
64
	private CommentaireListe commentaires = null;
68
	private CommentaireListe commentaires = null;
65
	protected boolean commentairesChargementOk = false;
69
	protected boolean commentairesChargementOk = false;
Line 160... Line 164...
160
			public void handleEvent(BaseEvent be) {
164
			public void handleEvent(BaseEvent be) {
161
				modifier.fireEvent(Events.Select);
165
				modifier.fireEvent(Events.Select);
162
			}
166
			}
163
		});
167
		});
164
		add(grille);
168
		add(grille);
-
 
169
		
-
 
170
		// Définition de la barre de pagination
-
 
171
		pagination = new BarrePaginationVue(new StructureListe(), mediateur);
-
 
172
		setBottomComponent(pagination);
165
	}
173
	}
Line 166... Line 174...
166
	
174
	
167
	private ColumnConfig creerColonneType() {
175
	private ColumnConfig creerColonneType() {
168
		GridCellRenderer<Commentaire> typeRendu = new GridCellRenderer<Commentaire>() {
176
		GridCellRenderer<Commentaire> typeRendu = new GridCellRenderer<Commentaire>() {
Line 237... Line 245...
237
	}
245
	}
Line 238... Line 246...
238
	
246
	
239
	public void rafraichir(Object nouvellesDonnees) {
247
	public void rafraichir(Object nouvellesDonnees) {
240
		if (nouvellesDonnees instanceof CommentaireListe) {
248
		if (nouvellesDonnees instanceof CommentaireListe) {
-
 
249
			commentaires = (CommentaireListe) nouvellesDonnees;
-
 
250
			
-
 
251
			pagination.setlistePaginable(commentaires);
-
 
252
			pagination.rafraichir(commentaires.getPageTable());
241
			commentaires = (CommentaireListe) nouvellesDonnees;
253
			
242
			commentairesChargementOk = true;
254
			commentairesChargementOk = true;
243
		} else if (nouvellesDonnees instanceof ValeurListe) {
255
		} else if (nouvellesDonnees instanceof ValeurListe) {
244
			ValeurListe listeValeursReceptionnee = (ValeurListe) nouvellesDonnees;
256
			ValeurListe listeValeursReceptionnee = (ValeurListe) nouvellesDonnees;
245
			Iterator<String> it = listeValeursReceptionnee.keySet().iterator();
257
			Iterator<String> it = listeValeursReceptionnee.keySet().iterator();