je rencontre un problème dans mon formulaire, au niveau de ma liste déroulante.
Explication, J\'envoi une liste d\'objets en paramétre et je dois afficher dans un select une propriété de cet objet.
Problème :
Il me renvoi une erreur (que lorsque j\'utilise un select, une zone de texte fonctionne).
Une partie du code de ma classe htvalpred :
public class htField {
int idaprojettype;
public int type;
public int entier;
public String date;
public float reel;
public boolean booleen;
public String chaine;
}
le code de ma classe htaprojettype :
public htAProjet_Type(AProjet_Type P){
this.id=P.getId_AProjet_Type();
this.libelle=P.getLibelle_AProjet_Type();
this.type = P.getType_Valeur();
this.idprojettype = P.getID_Projet_Type();
this.lstvp = null;
System.out.println(\"nb de val pred : \" + P.getLst_ValPred().size());
if (P.getLst_ValPred().size()!=0){
System.out.println(\"attribut : \" + this.getLibelle());
System.out.println(\"il y a des valpred\");
this.lstvp = new htValPred[P.getLst_ValPred().size()];
for (int i=0; i<P.getLst_ValPred().size();i++){
htValPred htvp = new htValPred( (Valeur_Predefinie) P.getLst_ValPred().get(i));
System.out.println(htvp.getM_Id_ValPred());
this.lstvp[i]=htvp;
}
}
}
Voici le code de mon controleur :
for (int i=0;i<PT.getLst_Aprojet_Type().size();i++){
AProjet_Type APT = new AProjet_Type();
APT = (AProjet_Type) PT.getLst_Aprojet_Type().get(i);
liste_aprojet_type[i] = APT;
htaprojettype[i]=new htAProjet_Type(APT);
}
request.setAttribute(\"LISTE_APROJET_TYPE\", htaprojettype);
ERREUR BBCODE SUR CE MESSAGE : - Une balise g n'est pas fermée !
pour info, mon objet APT est un objet ayant comme propriété une liste d'objets VP, sur lesquels je désire afficher une propriété dans la liste déroulante.