JSF Add to selectOneMenu from a List<School>
I have a List<School> object which hold School.Id, School.Name, and School.Address .

I need to list all the School.Name in a selectOneMenu List box. How will be the Java code and the corresponding JSF code will be.

My workings so far;

    <h:selectOneMenu value="#{School.listschoolName}">
    <f:selectItems value="#{School.listschoolName}" />
    </h:selectOneMenu>

jave class

        private List<School> listschool; 
        *** And also i got the corresponding getters and setters for these
            public void listschoolName(){
        setListschool(hml.findAllSchool());
        }

The `findAllSchool()` method actually returns a `List<School>` object.

I need to display these School Names on a List Box (dropdown / selectOneMenu ). How can i do this ?

* I am using Netbeans 6.9.1 and Galssfish 3
JSF Add to selectOneMenu from a List<School>
===

I have a List<School> object which hold School.Id, School.Name, and School.Address .

I need to list all the School.Name in a selectOneMenu List box. How will be the Java code and the corresponding JSF code will be.

My workings so far;

    <h:selectOneMenu value="#{School.listschoolName}">
    <f:selectItems value="#{School.listschoolName}" />
    </h:selectOneMenu>

jave class

        private List<School> listschool; 
        *** And also i got the corresponding getters and setters for these
            public void listschoolName(){
        setListschool(hml.findAllSchool());
        }

The `findAllSchool()` method actually returns a `List<School>` object.

I need to display these School Names on a List Box (dropdown / selectOneMenu ). How can i do this ?

* I am using Netbeans 6.9.1 and Galssfish 3