3 Replies Latest reply on Sep 3, 2010 1:46 PM by nbelaevski

    jsf 2.0 and java.util.set

    nimo22

      Does JSF 2.0 provide iterating through java.util.set ?

       

      I have tried but it seems it not supports that.  Am I right?

       

       

      It is really annoying to provide a additional getter-method only for jsf:

       

      @OneToMany
      private Set<Hobby> hobbies = new HashSet<Hobby>();
      public Set<Hobby> getHobbies() {return hobbies;}
      public void setHobbies(Set<Hobby> hobbies) {this.hobbies= hobbies;}


      // extra getter for JSF

      public List<Hobby> getListHobbies() {return new ArrayList<Hobby>(hobbies);}

       

       

      #{hobbies} is not possible

       

      #{listHobbies} is possible