Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 373 Rev 379
Line 97... Line 97...
97
		
97
		
98
		store = new ListStore<Structure>();
98
		store = new ListStore<Structure>();
Line 99... Line 99...
99
		store.sort("ville", SortDir.ASC);
99
		store.sort("ville", SortDir.ASC);
100
		
-
 
101
		binder = new TableBinder<Structure>(table, store);
100
		
102
		binder.setAutoSelect(true);
101
		binder = new TableBinder<Structure>(table, store);
103
		binder.addSelectionChangedListener(new SelectionChangedListener<Structure>() {
102
		binder.addSelectionChangedListener(new SelectionChangedListener<Structure>() {
104
			public void selectionChanged(SelectionChangedEvent<Structure> event) {
103
			public void selectionChanged(SelectionChangedEvent<Structure> event) {
105
				Structure m = (Structure) event.getSelectedItem();
104
				Structure m = (Structure) event.getSelectedItem();
106
				clicListe(m);
105
				clicListe(m);
Line 107... Line 106...
107
			}
106
			}
108
		});
107
		});
Line 109... Line 108...
109
 
108
 
-
 
109
		setLayout(new FitLayout());
110
		setLayout(new FitLayout());
110
	}
-
 
111
 
111
	}
112
	private void clicListe(Structure structure) {
Line 112... Line 113...
112
 
113
		if (store.getCount() > 0) {
113
	private void clicListe(Structure institution) {
114
			mediateur.clicListeStructure(structure);
114
		mediateur.clicListeInstitution(institution);
115
		}
115
	}
116
	}
Line 116... Line 117...
116
 
117
 
117
	public void rafraichir(Object nouvelleDonnees) {
118
	public void rafraichir(Object nouvelleDonnees) {
118
		if (nouvelleDonnees instanceof StructureListe) {
119
		if (nouvelleDonnees instanceof StructureListe) {
Line -... Line 120...
-
 
120
			StructureListe structures = (StructureListe) nouvelleDonnees;
-
 
121
			setHeading("Institutions");
119
			StructureListe institutions = (StructureListe) nouvelleDonnees;
122
			
120
			setHeading("Institutions");
123
			List<Structure> liste = (List<Structure>) structures.toList();
121
			
124
			store.removeAll();
122
			List<Structure> liste = (List<Structure>) institutions.toList();
-
 
123
			store.removeAll();
-
 
124
			store.add(liste);
125
			store.add(liste);
125
 
126
 
126
			if (institutions.size() > 0) {
127
			mediateur.actualiserPanneauCentral();
127
				table.getSelectionModel().select(0);
128
			
128
			}
129
			if (store.getCount() > 0) {