Does anybody know how to hide duplicate values (course names) from SelectItem?
My code:
SelectItem  courseOfferingItem = new SelectItem ("courseOffering.id", "Course Offering");
courseOfferingItem.setOptionDataSource(CoursesOfferingDS.getInstance());
courseOfferingItem.setDisplayField("courseOffering.courseName");
c开发者_StackOverflowourseOfferingItem.setShowDisabled(false);
SelectItem is showing courses CBNST, FIT, FIT, DS but I don't want to show FIT two times. 
you must use LinkedHashMap to populate your ComboBox items. it will be easy to set and manage and duplicate values will be removed. it can be done by.... SelectItem courseOfferingItem = new SelectItem(); courseOfferingItem.setValueMap(linedHashMap);
and linkedHashMap will contain your item id and item value...hope it will be useful to you...
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论