Problème avec les attributs
Bonjour a tous
j'essaye de creer ma propre tag ( version 2.0 )
La TLD
Code:
1 2 3 4 5 6 7 8 9 10
| <tag>
<name>option</name>
<tag-class>com.atos.tag.OptionTag</tag-class>
<body-content>scriptless</body-content>
<attribute>
<name>count</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag> |
Le tag
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| public class OptionTag extends SimpleTagSupport {
private int count = 0;
public void setCount (int value) {
this.count = value;
}
public void doTag() throws JspException, IOException {
try{
for (int i=0; i<count; i++)
getJspBody().invoke(null);
}catch (Exception e){
}
}
} |
Tout semble clair :D et pourtant , j'ai jasper qui rale... :(
Code:
1 2 3
| org.apache.jasper.JasperException: /pages/prix.jsp(72,2) Impossible de trouver une méthode de mise à jour pour l'attribut: count
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) |
Je ne comprends pas cette erreur. Dans ma class il y a bien un setter pour ma propriete count 8O
Si quelqu'un a deja eu ce probleme, merci d'avance.