Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 453 Rev 468
Line 9... Line 9...
9
import org.tela_botanica.client.i18n.Constantes;
9
import org.tela_botanica.client.i18n.Constantes;
10
import org.tela_botanica.client.interfaces.Rafraichissable;
10
import org.tela_botanica.client.interfaces.Rafraichissable;
11
import org.tela_botanica.client.modeles.Collection;
11
import org.tela_botanica.client.modeles.Collection;
12
import org.tela_botanica.client.modeles.CollectionListe;
12
import org.tela_botanica.client.modeles.CollectionListe;
13
import org.tela_botanica.client.modeles.Information;
13
import org.tela_botanica.client.modeles.Information;
14
import org.tela_botanica.client.modeles.Structure;
-
 
15
import org.tela_botanica.client.modeles.StructureListe;
-
 
16
import org.tela_botanica.client.modeles.Utilisateur;
14
import org.tela_botanica.client.modeles.Utilisateur;
Line 17... Line 15...
17
 
15
 
18
import com.extjs.gxt.ui.client.Registry;
16
import com.extjs.gxt.ui.client.Registry;
19
import com.extjs.gxt.ui.client.Style.SelectionMode;
17
import com.extjs.gxt.ui.client.Style.SelectionMode;
Line 87... Line 85...
87
 
85
 
Line 88... Line 86...
88
		setTopComponent(toolBar);
86
		setTopComponent(toolBar);
89
 
87
 
90
		List<TableColumn> columns = new ArrayList<TableColumn>();
88
		List<TableColumn> columns = new ArrayList<TableColumn>();
-
 
89
		// ATTENTION : les noms des colonnes doivent correspondrent aux noms variables de la classe utilisée dans la liste
91
		// ATTENTION : les noms des colonnes doivent correspondrent aux noms variables de la classe utilisée dans la liste
90
		columns.add(new TableColumn("structure_nom", i18nC.structure(), .3f));
-
 
91
		columns.add(new TableColumn("structure_ville", i18nC.ville(), .2f));
-
 
92
		columns.add(new TableColumn("nom", i18nC.nom(), .5f));
Line 92... Line 93...
92
		columns.add(new TableColumn("structure", i18nC.structure(), .3f));
93
		
93
		columns.add(new TableColumn("nom", i18nC.nom(), .7f));
94
		columns.get(0).setHidden(true);
94
		
95
		
95
		TableColumnModel cm = new TableColumnModel(columns);
96
		TableColumnModel cm = new TableColumnModel(columns);
Line 102... Line 103...
102
		
103
		
103
		store = new ListStore<Collection>();
104
		store = new ListStore<Collection>();
Line 104... Line 105...
104
		store.sort("nom", SortDir.ASC);
105
		store.sort("nom", SortDir.ASC);
105
		
106
		
106
		binder = new TableBinder<Collection>(table, store);
107
		binder = new TableBinder<Collection>(table, store);
107
		binder.addSelectionChangedListener(new SelectionChangedListener<Structure>() {
108
		binder.addSelectionChangedListener(new SelectionChangedListener<Collection>() {
108
			public void selectionChanged(SelectionChangedEvent<Structure> event) {
109
			public void selectionChanged(SelectionChangedEvent<Collection> event) {
109
				Structure m = (Structure) event.getSelectedItem();
110
				Collection m = (Collection) event.getSelectedItem();
110
				clicListe(m);
111
				clicListe(m);
Line 111... Line 112...
111
			}
112
			}
112
		});
113
		});
Line 113... Line 114...
113
 
114
 
114
		setLayout(new FitLayout());
115
		setLayout(new FitLayout());
115
	}
116
	}
116
 
117
 
117
	private void clicListe(Structure structure) {
118
	private void clicListe(Collection m) {
Line 118... Line 119...
118
		if (store.getCount() > 0) {
119
		if (store.getCount() > 0) {
119
			mediateur.clicListeStructure(structure);
120
			mediateur.clicListeCollection(m);