Subversion Repositories eFlore/Archives.cel-v1

Rev

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

Rev 12 Rev 13
Line 22... Line 22...
22
		private DateList dateList = null;
22
		private DateList dateList = null;
23
		private NameAssistant nameAssistant=null;
23
		private NameAssistant nameAssistant=null;
24
		private LocationAssistant locationAssistant=null;
24
		private LocationAssistant locationAssistant=null;
25
		private InventoryItem inventoryItem=null;
25
		private InventoryItem inventoryItem=null;
26
		private EntryPanel entryPanel=null;
26
		private EntryPanel entryPanel=null;
-
 
27
		private ActionPanel actionPanel=null;
-
 
28
		private SearchPanel searchPanel=null;
Line 27... Line 29...
27
		
29
		
28
		private TextBox date = null; 
30
		private TextBox date = null; 
29
		private TextBox complementLocation = null; 
31
		private TextBox complementLocation = null; 
Line 60... Line 62...
60
 
62
 
Line 61... Line 63...
61
			this.onLocationSelected("all");
63
			this.onLocationSelected("all");
Line -... Line 64...
-
 
64
			
-
 
65
		}
-
 
66
		
-
 
67
		
-
 
68
		
-
 
69
		/**
-
 
70
		 * Action sur selection d'une observation : affichage du detail
-
 
71
		 */
-
 
72
		
-
 
73
		public void onInventoryItemSelected(String ordre) {
-
 
74
		
-
 
75
			entryPanel.setOrdre(ordre);
-
 
76
			entryPanel.update();
Line -... Line 77...
-
 
77
			
-
 
78
			
-
 
79
		}
-
 
80
 
-
 
81
		
62
			
82
		/**
-
 
83
		 * Action sur selection d'un lieu : affichage de la liste des taxons correspondants
-
 
84
		 */
-
 
85
		
-
 
86
		public void onSearch(String search) {
-
 
87
	
-
 
88
			if (search.trim().compareTo("")==0) {
Line 63... Line -...
63
		}
-
 
64
		
89
				search="all";
-
 
90
			}
-
 
91
			inventoryItemList.setSearch(search);
Line 65... Line 92...
65
 
92
			inventoryItemList.updateCount();
66
		public void onEntryClick() {
93
			
67
			
94
		}
Line 76... Line 103...
76
		
103
		
77
			inventoryItemList.setLocation(loc);
104
			inventoryItemList.setLocation(loc);
78
			inventoryItemList.setDate("all");
105
			inventoryItemList.setDate("all");
Line 79... Line -...
79
			inventoryItemList.updateCount();
-
 
Line 80... Line 106...
80
			
106
			inventoryItemList.updateCount();
81
			if (entryPanel!=null) {
107
			
82
			
108
			
83
				if ((loc.compareTo("000null")==0) || (loc.compareTo("all")==0)) {
109
			if ((loc.compareTo("000null")==0) || (loc.compareTo("all")==0)) {
84
					locationAssistant.setText("");
110
				locationAssistant.setText("");
85
				}
-
 
86
				else {
-
 
87
					locationAssistant.setText(loc);
111
			}
Line 88... Line 112...
88
				}
112
			else {
Line 100... Line 124...
100
 
124
 
101
			inventoryItemList.setDate(date);
125
			inventoryItemList.setDate(date);
Line 102... Line 126...
102
			inventoryItemList.updateCount();
126
			inventoryItemList.updateCount();
103
 
-
 
Line 104... Line 127...
104
			/*
127
 
105
			if (entryPanel!=null) {
128
			/*
106
			
129
			
107
				if ((loc.compareTo("000null")==0) || (loc.compareTo("all")==0)) {
130
				if ((loc.compareTo("000null")==0) || (loc.compareTo("all")==0)) {
108
					locationAssistant.setText("");
131
					locationAssistant.setText("");
109
				}
132
				}
Line 110... Line -...
110
				else {
-
 
111
					locationAssistant.setText(loc);
133
				else {
Line 112... Line 134...
112
				}
134
					locationAssistant.setText(loc);
Line 149... Line 171...
149
		 */
171
		 */
Line 150... Line 172...
150
		
172
		
Line 151... Line 173...
151
		public void onAddInventoryItem() {
173
		public void onAddInventoryItem() {
152
		
174
		
153
			// TODO : singleton ?
175
			// TODO : singleton ?
Line 154... Line 176...
154
			registerInventoryItem(new InventoryItem(nameAssistant.getText(),nameAssistant.getValue(),locationAssistant.getText(),locationAssistant.getValue(),date.getText(),complementLocation.getText(),comment.getText()));
176
			registerInventoryItem(new InventoryItem(nameAssistant.getText(),nameAssistant.getValue(),locationAssistant.getText(),locationAssistant.getValue(),date.getText(),complementLocation.getText(),comment.getText(),"null"));
Line -... Line 177...
-
 
177
			inventoryItemList.addelement();
-
 
178
			
-
 
179
		}
-
 
180
 
-
 
181
		
-
 
182
		/**
-
 
183
		 * Action prealable à la modification d'une observation : controle presence champs requis et lancement mise a jour 
-
 
184
		 * 
-
 
185
		 */
-
 
186
 
-
 
187
		public void onModifyInventoryItem(String ordre) {
-
 
188
 
-
 
189
		// TODO : singleton ?
Line 155... Line 190...
155
			inventoryItemList.addelement();
190
		registerInventoryItem(new InventoryItem(nameAssistant.getText(),nameAssistant.getValue(),locationAssistant.getText(),locationAssistant.getValue(),date.getText(),complementLocation.getText(),comment.getText(),ordre));
156
			
191
		inventoryItemList.updateElement();
Line 276... Line 311...
276
		
311
		
277
	    public void  registerEntryPanel(EntryPanel entryPanel) {
312
	    public void  registerEntryPanel(EntryPanel entryPanel) {
278
	    	this.entryPanel=entryPanel;
313
	    	this.entryPanel=entryPanel;
Line -... Line 314...
-
 
314
		}
-
 
315
 
-
 
316
	    
-
 
317
		
-
 
318
	    public void  registerActionPanel(ActionPanel actionPanel) {
-
 
319
	    	this.actionPanel=actionPanel;
-
 
320
		}
Line -... Line 321...
-
 
321
 
-
 
322
	
-
 
323
		
-
 
324
	    public void  registerSearchPanel(SearchPanel searchPanel) {
-
 
325
	    	this.searchPanel=searchPanel;
279
		}
326
		}
280
 
327
 
281
		
328
 
282
		/**
329
		/**