- This topic has 3 replies, 3 voices, and was last updated 19 years, 2 months ago by Scott Anderson.
-
AuthorPosts
-
youssef_MemberHello i’ve got a probleme with the tag Selectonemenu i’ve used it but it does not return any value to the bean :: this is the syntaxe in the jsp :
<h:selectOneMenu id=”valeur” value=”#{projet.valeur}”>
<f:selectItems value=”#{projet.proref}” />
</h:selectOneMenu>so the menu is well displayed but when i’m trying to display the property “valeur” it’s gives me null.
proref is a SelectItem array :
public SelectItem[] getProref() {
projet pr= new projet();
ResultSet rs = null;
String ww= new String();
int i=0;
int occ=0;
occ=Connexion.taille(table);
String requete = “Select * from projet”;
SelectItem[] tabpro= new SelectItem[occ];
try {
rs = Connexion.getcon().executeQuery(requete);while (rs.next()) {
tabpro[i]= new SelectItem(new Integer(i+1),rs.getString(“nom”),rs.getString(“nom”));
i++;
}
} catch (SQLException e) {
e.printStackTrace();
}
return tabpro;
}code for property valeur is :
public SelectItem getValeur(){
System.out.println(” Invocation get ::: “+ ++i +”:valeur ::”+ valeur );return valeur;
}
public void setValeur(int key){
}i’m really sick of that cause i’ve tried all solution : i’ve declared key as string selectitem and Integer but no way it seem’s the jsp page don’t give a value to the property projet.valeur
please help me by giving me a source or precise advise
thanx anyway !!!!! 😯 😕 😕 😯 🙄 😀
Riyad KallaMemberMoving to OT> Sof tDev.
youssef_Memberthat’s all what you can say !!!!!!!!!!!!
can you please save me
or if you don’t wanna help say it
Scott AndersonParticipantyoussef,
Riyad moved your post to this forum so that it can be categorized correctly so that the right people will see it.
In explaination, your question isn’t about usage of a MyEclipse feature, but rather a general Struts programming question. The job of our support people is to help and instruct in MyEclipse feature usage, but they can’t possibly take time to research and answer any question anyone posts on software development in general. However, since hundreds of smart developers hang out on these forums regularly, we provide this forum for software development topics that are not related to usage of MyEclipse. There are actually lots of our users that like helping out and answering general development questions, and now they’ll be able to find your question easily. Thanks in advance for your understanding.
-
AuthorPosts