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