Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 901 Rev 902
Line 936... Line 936...
936
	//+----------------------------------------------------------------------------------------------------------------+
936
	//+----------------------------------------------------------------------------------------------------------------+
937
	public void clicListeProjet(Projet projet) {
937
	public void clicListeProjet(Projet projet) {
938
		panneauCentre.getContenu().rafraichir(projet);
938
		panneauCentre.getContenu().rafraichir(projet);
939
	}
939
	}
Line 940... Line 940...
940
 
940
 
-
 
941
	public void clicSupprimerProjet(final List<Projet> projetListe) {
-
 
942
		if (projetListe.size() <= 0) {
-
 
943
			MessageBox.alert("Attention", "Vous devez sélectionner un projet", null); 
-
 
944
		} else {
941
	public void clicSupprimerProjet(List<Projet> selectedItems) {
945
			String message = "Voulez-vous vraiment supprimer ces projets ?";
-
 
946
			if (projetListe.size() == 1) {
-
 
947
				message = "Voulez-vous vraiment supprimer ce projet ?";
-
 
948
			}
-
 
949
			
-
 
950
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
-
 
951
				public void handleEvent(MessageBoxEvent ce) {  
-
 
952
					Dialog dialog = (Dialog) ce.getComponent();
-
 
953
				    Button btn = ce.getButtonClicked();  
-
 
954
				    	   
-
 
955
				    if (btn.getText().equals(dialog.yesText)) {
-
 
956
				    	modele.supprimerProjet(panneauCentre.getContenu(), projetListe);  
-
 
957
				    }
-
 
958
				}
-
 
959
			};
-
 
960
				     
-
 
961
			MessageBox.confirm("Supprimer un projet", message, listenerSuppression);
Line 942... Line 962...
942
		// TODO Auto-generated method stub
962
		}
Line 943... Line 963...
943
		
963
		
944
	}
964
	}