comment passé un attribut dans un lien ou un boutton
salut TLM
j'ai un tableau constitué par une liste de personne, et je veut faire devant chaque ligne par exemple "SUPPRIMER" ou "MODIFIER"
je travail avec ICefaces, j'ai trouvé deux solution la premier
______________ LA PREMIER ____________
dans la JSPx
Code:
1 2 3 4
| <h:outputLink value="viewToDo.jsf">
<h:outputText value="Delete" />
<f:param value="#{todotodo.id}" name="toDoId" />
</h:outputLink> |
et dans faces-config
Code:
1 2 3 4
| <managed-property>
<property-name>toDoId</property-name>
<value>#{param.toDoId}</value>
</managed-property> |
et dans le bean
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
private String toDoId;
public void setToDoId(String toDoId) {
this.toDoId = toDoId;
log.debug("#DDD############ setToDoId(-" + toDoId + "-)");
if (toDoId != null && !toDoId.equals("")) {
Integer id = new Integer(toDoId);
try {
if (toDoService != null) {
toDo = toDoService.getToDo(id);
}
} catch (JoTestException e) {
log.error("setToDoId, error :" + e);
}
}
} |
___________________LA DEUXIÈME_____________
avec l'utilisation de
Code:
1 2 3
| <h:commandLink actionListener="#{userEditForm.deleteUser}">
<h:outputText value="Delete"/>
</h:commandLink> |
mais je sais pas comment faire
et merci d'avoir m'aide et même pour ceux qui on l'intention d'aider