1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
public HtmlPanelGrid createList(final List<Group> groups) {
final HtmlPanelGrid list = new HtmlPanelGrid();
list.setColumns(3);
list.setStyleClass("panelList");
final ExpressionFactory factory = getApplication().getExpressionFactory();
final ELContext elContext = FacesContext.getCurrentInstance().getELContext();
final MethodExpression linkNextAction = factory.createMethodExpression(elContext,
"#{TerminalPool_1.linkNextAction}", String.class, new Class[]{});
for (Group g : groups) {
final HtmlGraphicImage imgStatus = new HtmlGraphicImage();
final HtmlGraphicImage imgType = new HtmlGraphicImage();
final HtmlCommandLink link = new HtmlCommandLink();
imgStatus.setAlt(bundle.getString("status_alive"));
imgStatus.setTitle(bundle.getString("status_alive"));
imgStatus.setValue("../../resources/images/statut-gris.png");
imgType.setUrl("../../public/images/acceptation_set_group.png");
link.setTitle(g.getDescription());
link.setActionExpression(linkNextAction);
link.setValue(g.getName());
//ICI AJOUTER LE TRUC QUI ME PERMET D'IDENTIFIER LE LIEN
list.getChildren().add(imgStatus);
list.getChildren().add(imgType);
list.getChildren().add(link);
}
return list;
} |
Partager