5 Replies Latest reply on Apr 21, 2010 10:45 AM by Jeff Reif

    selectonemenu controlls another

    Jeff Reif Novice

      Hello everybody.


      I have 2 Databasetables, one with a list of countries another with a list of cities.


      The user have first to choice the country and then select the city.


      I used two h:selectOneMenu components,  the values of the second depends on the first component.


      What is the best way to do this: ?



      I have a Bean class which looks like this:


      public class CityBean{
               private Long cityId;;
               private Long countryId;
               public SelectItem[] getCities(){ ... }
               public SelectItem[] getCountries() { ... }
              //getter and setters for cityId and countryId;