Bonjour, j'ai suivi la doc de pretty faces pour transmettre un paramètre à un attribut d'un managedBean :
Mon ManagedBean :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 <url-mapping id="inscription1"> <pattern value="/inscription-#{/[1]/registerManagedBean.actionStr}.html" /> <view-id value="/WEB-INF/base/register.xhtml" /> </url-mapping>
Le println m'affiche une valeur nulle, je ne vois pas ce que j'ai mal fait.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 @ManagedBean @RequestScoped public class RegisterManagedBean extends User implements Serializable { private String actionStr; /** * Creates a new instance of RegisterManagedBean */ public RegisterManagedBean() { System.out.println("actionStr="+actionStr); } [...] /** * @return the actionStr */ public String getActionStr() { return actionStr; } /** * @param actionStr the actionStr to set */ public void setActionStr(String actionStr) { this.actionStr = actionStr; }
Merci pour votre aide.
Partager