bonjour à tous,
c'est un homme désespéré qui se présente à vous pour vous implorer de l'aider. Je vous explique : j'essaye tout simplement d'afficher à l'aide du displaytag une chtite liste de users pris dans une base de données toute bete. la connexion marche bien, la requete egalement (déja testé), tout a bien été installé pour faire fonctionner le displaytag (installation, api, etc etc ...) , MAIS j'obtiens le message d'erreur suivant à l'execution :
exception
javax.servlet.ServletException: Error looking up property "_id" in object type "com.orca.struts.business.Adherent".
Exception: [.LookupUtil] Error looking up property "_id" in object type "com.orca.struts.business.Adherent". Cause: Unknown property '_id'
ma Form :
public class ListeAdherentForm extends ActionForm {
...
...
public Collection searchAdherent(){
AdherentService adherentService = new AdherentService();
return adherentService.getAdherentList();
}
}
ma classe AdherentService
package com.orca.struts.business;
public class AdherentService {
public AdherentService(){}
public Collection getAdherentList(){
... (creation d'une collection de types Adherent)
return arrC; // la collection
}
ma classe Adherent
package com.orca.struts.business;
public class Adherent {
private static final String EMPTY_STRING = "";
private int _id;
private String _nom;
private String _prenom;
... (tout les getters et les setters)
}
et enfin mon JSP
<%@ page language="java"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="/WEB-INF/displaytag-11.tld" prefix="display"%>
<html:html locale="true">
<head>
<title>JSP for listeAdherentForm form</title>
</head>
<body>
<html:form action="/listeAdherent">
<display:table name="searchAdherent" id="Adherent">
<display:column property="_id" title="ID" />
<display:column property="_nom" title="Nom" />
<display:column property="_prenom" title="Prenom" />
</display:table>
</html:form>
</body>
</html:html>
MERCI BEAUCOUP POUR VOTRE AIDE !! HELP !!![]()
![]()
Partager