Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 156 Rev 210
Line 13... Line 13...
13
import org.tela_botanica.client.modeles.StructureListe;
13
import org.tela_botanica.client.modeles.StructureListe;
14
import org.tela_botanica.client.modeles.Utilisateur;
14
import org.tela_botanica.client.modeles.Utilisateur;
Line 15... Line 15...
15
 
15
 
16
import com.extjs.gxt.ui.client.Registry;
16
import com.extjs.gxt.ui.client.Registry;
-
 
17
import com.extjs.gxt.ui.client.Style.SelectionMode;
17
import com.extjs.gxt.ui.client.Style.SelectionMode;
18
import com.extjs.gxt.ui.client.Style.SortDir;
18
import com.extjs.gxt.ui.client.binder.TableBinder;
19
import com.extjs.gxt.ui.client.binder.TableBinder;
19
import com.extjs.gxt.ui.client.event.ComponentEvent;
20
import com.extjs.gxt.ui.client.event.ComponentEvent;
20
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
21
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
21
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
22
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
Line 86... Line 87...
86
		// ATTENTION : les noms des colonnes doivent correspondrent aux noms variables de la classe utilisée dans la liste
87
		// ATTENTION : les noms des colonnes doivent correspondrent aux noms variables de la classe utilisée dans la liste
87
		columns.add(new TableColumn("ville", "Ville", .3f));
88
		columns.add(new TableColumn("ville", "Ville", .3f));
88
		columns.add(new TableColumn("nom", "Nom", .7f));
89
		columns.add(new TableColumn("nom", "Nom", .7f));
Line 89... Line 90...
89
		
90
		
90
		TableColumnModel cm = new TableColumnModel(columns);
-
 
91
 
91
		TableColumnModel cm = new TableColumnModel(columns);
92
		table = new Table(cm);
92
		table = new Table(cm);
93
		table.setSelectionMode(SelectionMode.MULTI);
93
		table.setSelectionMode(SelectionMode.MULTI);
94
		table.setBorders(false);
-
 
-
 
94
		table.setBorders(false);
95
 
95
		table.setStripeRows(true);
-
 
96
		add(table);
96
		add(table);
97
		
97
 
98
		
-
 
99
		store = new ListStore<Structure>();
98
		store = new ListStore<Structure>();
100
		store.sort("ville", SortDir.ASC);
99
 
101
		
100
		binder = new TableBinder<Structure>(table, store);
102
		binder = new TableBinder<Structure>(table, store);
101
		binder.setAutoSelect(true);
103
		binder.setAutoSelect(true);
102
		binder.addSelectionChangedListener(new SelectionChangedListener<Structure>() {
104
		binder.addSelectionChangedListener(new SelectionChangedListener<Structure>() {
103
			public void selectionChanged(SelectionChangedEvent<Structure> event) {
105
			public void selectionChanged(SelectionChangedEvent<Structure> event) {
Line 136... Line 138...
136
			
138
			
137
			// Test pour savoir si la liste contient des éléments
139
			// Test pour savoir si la liste contient des éléments
138
			if (listeInstitutions.size() > 0) {
140
			if (listeInstitutions.size() > 0) {
139
				binder.setSelection((Structure) listeInstitutions.get(0));
141
				binder.setSelection((Structure) listeInstitutions.get(0));
-
 
142
			}
140
			}
143
			
141
		} else if (nouvelleDonnees instanceof Information) {
144
		} else if (nouvelleDonnees instanceof Information) {
142
			Information info = (Information) nouvelleDonnees;
145
			Information info = (Information) nouvelleDonnees;
143
			if (info.getType().equals("suppression_structure")) {
146
			if (info.getType().equals("suppression_structure")) {
144
				// Affichage d'un message d'information 
147
				// Affichage d'un message d'information