46 |
aurelien |
1 |
package org.tela_botanica.del.client.vues.plateformedetermination.forum;
|
|
|
2 |
|
|
|
3 |
import java.util.List;
|
|
|
4 |
|
70 |
aurelien |
5 |
import org.tela_botanica.del.client.i18n.I18n;
|
94 |
aurelien |
6 |
import org.tela_botanica.del.client.modeles.ObservationValidation;
|
46 |
aurelien |
7 |
|
|
|
8 |
import com.google.gwt.core.client.GWT;
|
|
|
9 |
import com.google.gwt.uibinder.client.UiBinder;
|
|
|
10 |
import com.google.gwt.uibinder.client.UiField;
|
|
|
11 |
import com.google.gwt.user.client.ui.Composite;
|
|
|
12 |
import com.google.gwt.user.client.ui.HTML;
|
|
|
13 |
import com.google.gwt.user.client.ui.Widget;
|
|
|
14 |
|
|
|
15 |
public class ForumVue extends Composite {
|
|
|
16 |
|
|
|
17 |
private static ForumUIiBinder uiBinder = GWT.create(ForumUIiBinder.class);
|
|
|
18 |
interface ForumUIiBinder extends UiBinder<Widget, ForumVue>{};
|
|
|
19 |
|
|
|
20 |
@UiField(provided = true)
|
|
|
21 |
HTML htmlTableau = new HTML();
|
|
|
22 |
|
|
|
23 |
public ForumVue() {
|
|
|
24 |
initWidget(uiBinder.createAndBindUi(this));
|
|
|
25 |
}
|
|
|
26 |
|
94 |
aurelien |
27 |
public void chargerObservations(List<ObservationValidation> determinations) {
|
46 |
aurelien |
28 |
|
|
|
29 |
String ligne = "<table>"+
|
|
|
30 |
"<tr>"+
|
70 |
aurelien |
31 |
"<th> "+I18n.getVocabulary().nom()+" </th>"+
|
|
|
32 |
"<th> "+I18n.getVocabulary().contributeur()+" </th>"+
|
80 |
aurelien |
33 |
"<th> "+I18n.getVocabulary().fiabilite()+" </th>"+
|
|
|
34 |
"<th> "+I18n.getVocabulary().date()+" </th>"+
|
|
|
35 |
"<th> "+I18n.getVocabulary().commentaire()+" </th>"+
|
46 |
aurelien |
36 |
"</tr>";
|
|
|
37 |
|
94 |
aurelien |
38 |
for (ObservationValidation observationDetermination : determinations) {
|
46 |
aurelien |
39 |
ligne += "<tr>"+
|
|
|
40 |
"<td>"+observationDetermination.getEspece()+"</td>"+
|
|
|
41 |
"<td>"+observationDetermination.getContributeur()+"</td>"+
|
|
|
42 |
"<td>"+observationDetermination.getPourcentageConfiance()+"%</td>"+
|
94 |
aurelien |
43 |
"<td>"+observationDetermination.getDate()+"</td>"+
|
46 |
aurelien |
44 |
"<td>"+observationDetermination.getCommentaire()+"</td>"+
|
|
|
45 |
"</tr>";
|
|
|
46 |
}
|
|
|
47 |
ligne += "</table>";
|
|
|
48 |
htmlTableau.setHTML(ligne);
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
}
|