Erreur dans un formulaire avec Converter
Bonjour ,
je rencontre l'erreur suivante dans un formulaire :
Citation:
org.apache.jasper.JasperException: Exception in JSP: /login.jsp:22
19:
20: <h:outputLabel rendered="true" value="#{msg.password}"></h:outputLabel>
21: <h:inputSecret value="#{loginBean.password.convertedID }"> </h:inputSecret>
22: <f:converter converterId="javax.faces.Long"/>
23: <f:validator validatorId="com.tutorial.ValidatePassword"/>
24: <h:commandButton action="login" value="#{msg.login}"></h:commandButton>
25: </h:form>
(...)
java.lang.ClassCastException: javax.faces.component.html.HtmlForm cannot be cast to javax.faces.component.ValueHolder
Voici le source de mon login.jsp :
Code:
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
| <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<f:loadBundle basename="com.tutorial.messages" var="msg"/>
<title>Login</title>
</head>
<body>
<h:form>
<h:messages layout="table" ></h:messages>
<h:outputLabel rendered="true" value="#{msg.name}"> </h:outputLabel>
<h:inputText value="#{loginBean.name}" tabindex="0"></h:inputText>
<h:outputLabel rendered="true" value="#{msg.password}"></h:outputLabel>
<h:inputSecret value="#{loginBean.password.convertedID }"> </h:inputSecret>
<f:converter converterId="javax.faces.Long"/>
<f:validator validatorId="com.tutorial.ValidatePassword"/>
<h:commandButton action="login" value="#{msg.login}"></h:commandButton>
</h:form>
</body>
</html>
</f:view> |
Il me semble que l'erreur vient des deux lignes:
Code:
1 2
| <f:converter converterId="javax.faces.Long"/>
<f:validator validatorId="com.tutorial.ValidatePassword"/> |
car lorsque je les enleves la page s'affiche correctement.
Savez vous d'ou cela peut provenir et comment le corriger?