facebook

SelectOneMenu problem: it does not work

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #237258 Reply

    youssef_
    Member

    Hello 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 !!!!! 😯 😕 😕 😯 🙄 😀

    #237409 Reply

    Riyad Kalla
    Member

    Moving to OT> Sof tDev.

    #237421 Reply

    youssef_
    Member

    that’s all what you can say !!!!!!!!!!!!
    can you please save me
    or if you don’t wanna help say it

    #237444 Reply

    Scott Anderson
    Participant

    youssef,

    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.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: SelectOneMenu problem: it does not work

You must be logged in to post in the forum log in