-
Bug
-
Resolution: Fixed
-
Normal
-
8.0.1
-
Windows 10, Microsoft IE 11, Microsoft Edge, Firefox v54, Eclipse Neon3 (4.6.3), jdk 7, tomcat 7
I created a java procedure in order to update listbox content using a model.
This is the code, very simple:
public void listboxRenderer((List<MyData>) myList) { myListbox.setItemRenderer(listitemRenderer); ListModelList<MyData> listModelList = new ListModelList<MyData>((List<MyData>) myList); myListbox.setModel(listModelList); System.out.println("myListboxSize : " + myListbox.getItemCount()); System.out.println("visibleItemCount : " + myListbox.getVisibleItemCount()); for (Listitem item : myListbox.getItems()) { System.out.println(item + " - " + item.isVisible()); } }
This is the output:
-----------------------
availabilityListboxSize : 1
visibleItemCount : 1
<Listitem tYEQc4> - true
-----------------------
availabilityListboxSize : 1
visibleItemCount : 2
<Listitem tYEQz4> - true
-----------------------
availabilityListboxSize : 8
visibleItemCount : 10
<Listitem tYEQ16> - true
<Listitem tYEQ36> - true
<Listitem tYEQ56> - true
<Listitem tYEQ76> - true
<Listitem tYEQ96> - true
<Listitem tYEQb6> - true
<Listitem tYEQd6> - true
<Listitem tYEQf6> - true
-----------------------
It seems that after applying the model, visibleItemCount increases its value.