Récuppérer une valeur dans l'url
j'ai un petit p^roblème mais j'ai pas pu le résoudre:
dans mon url j'ai un paramètre que je veux getter la valeur dans ma classe java,
je peux afficher la valeur dans ma page jsf, mais je ne sais pas comment faire pour l'envoyer vers mon code java,
j'ai essayé avec binding :
Code:
1 2 3
| <h:outputText binding="#{selectList.aireProtegeeId}" >
#{aireProtegeeId}
</h:outputText> |
Mais voila l'erreur qui s'affiche:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| GRAVE: Error Rendering View[/AddDelegation.xhtml]
javax.faces.FacesException: javax.el.ELException: /AddDelegation.xhtml @21,108 binding="#{selectList.aireProtegeeId}": java.lang.IllegalArgumentException: argument type mismatch
at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:253)
at org.jboss.seam.jsf.SeamApplication.createComponent(SeamApplication.java:327)
at com.sun.facelets.tag.jsf.ComponentHandler.createComponent(ComponentHandler.java:224)
at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:139)......
.....
Caused by: javax.el.ELException: /AddDelegation.xhtml @21,108 binding="#{selectList.aireProtegeeId}": java.lang.IllegalArgumentException: argument type mismatch
at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:101)
at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:250)
... 74 more
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) |
apparement l'eeure vient du type de aireProtegee
Code:
1 2 3 4 5 6 7 8 9
| int aireProtegeeId;
public int getAireProtegeeId() {
return aireProtegeeId;
}
public void setAireProtegeeId(int aireProtegeeId) {
this.aireProtegeeId = aireProtegeeId;
} |
alors j'ai changé le type en String mais c'est toujours la meme erreur!!!!
y-a-t-il quelqu'un qui peut m'aider?? j'en ai vraiment besoin:cry: