title: Java Set not adding object when selecting items from Listbox
body: <p>I am using <strong>Java</strong>, <strong>Jooq</strong> and <strong>Zk7</strong> for my application but i am getting one issue see my scenario 
  I have <strong>Listbox</strong> which showing all the records in model i Have a add button when click on it i am adding new element in <strong>Listbox</strong> something like this </p>
  
  <pre><code>    private ListModelList&lt;Record&gt; adminListModelListSort;
      protected ListModelList&lt;Record&gt; adminListModelList;
  
      ValidWorkRecord new_record1 =  new ValidWorkRecord();
      adminListModelList.add(new_record1);
      adminNewListModelList.add(new_record1);
  </code></pre>
  
  <p>Listbox adding item no any issue but when i am taking back selected item i am getting single record
  And select item is something like this</p>
  
  <pre><code>WorkCode|WorkDesc|StatCanWorkType|StampDate|StampUser|AccessCode|WorkDesc2|Comments|ActiveFlag|
  +--------+--------+---------------+---------+---------+----------+---------+--------+----------+
  | *{null}|*{null} |*{null}        |*{null}  |*{null}  |   *{null}|*{null}  |*{null} |*{null}   |
  </code></pre>
  
  <p>So i added 5 new items in the <strong>Listbox</strong> and its showing 5 item added but when i am trying to get selecteditem it show only 1 item added if i am making any change in newly added item then it showing that item as a selected .
  Note:-first time newly added item content null values only .
  Do you know what is the issue with java <strong>Set</strong></p>
  
  <pre><code>private Set  selectedListItem;//get,set method
  </code></pre>
  
  <p>But when i tried below code everything worked fine
  ZUL Page</p>
  
  <pre><code>    &lt;?page title="new page title" contentType="text/html;charset=UTF-8"?&gt;
  &lt;zk&gt;
   &lt;window title="new page title" border="normal" id="inp"
    viewModel="@id('vm') @init('test.MyListbox')" apply="org.zkoss.bind.BindComposer"  &gt;
    &lt;button label="AddItem" onClick="@command('addNewItem')"  &gt;&lt;/button&gt;
  
  
    &lt;listbox model="@bind(vm.dataList)" selectedItems="@bind(vm.selectitems)" multiple="true" checkmark="true"&gt;
     &lt;listhead&gt;
      &lt;listheader value="A"&gt;&lt;/listheader&gt;
      &lt;listheader value="B"&gt;&lt;/listheader&gt;
      &lt;listheader value="C"&gt;&lt;/listheader&gt;
  
     &lt;/listhead&gt;
     &lt;template name="model" var="mymodel"&gt;
      &lt;listitem&gt;
       &lt;listcell&gt;
  
        &lt;textbox value="@bind(mymodel.a)" /&gt;
       &lt;/listcell&gt;
       &lt;listcell&gt;
        &lt;label value="@bind(mymodel.b)" /&gt;
  
       &lt;/listcell&gt;
       &lt;listcell&gt;
        &lt;label value="@bind(mymodel.c)" /&gt;
  
       &lt;/listcell&gt;
      &lt;/listitem&gt;
     &lt;/template&gt;
    &lt;/listbox&gt;
   &lt;/window&gt;
  &lt;/zk&gt;
  </code></pre>
  
  <p>View Model Code</p>
  
  <pre><code>package test;
  
  
  import java.util.ArrayList;
  import java.util.List;
  import java.util.Set;
  
  import org.zkoss.bind.annotation.AfterCompose;
  import org.zkoss.bind.annotation.Command;
  import org.zkoss.bind.annotation.ContextParam;
  import org.zkoss.bind.annotation.ContextType;
  import org.zkoss.bind.annotation.NotifyChange;
  import org.zkoss.zk.ui.Component;
  
  public class MyListbox {
  
   private List&lt;Data&gt; dataList;
   private Set selectitems;
  
   @AfterCompose
   public void afterCompose(@ContextParam(ContextType.VIEW) Component view) {
    try {
     dataList = new ArrayList&lt;Data&gt;();
     Data data;
     data = new Data("a1", "b1", "c1");
     dataList.add(data);
     data = new Data("a2", "b2", "c2");
     dataList.add(data);
     data = new Data("a3", "b3", "c3");
     dataList.add(data);
    } catch (Exception e) {
  
    }
   }
  
  
  
   public Set getSelectitems() {
      return selectitems;
  }
  
  
  
  public void setSelectitems(Set selectitems) {
      this.selectitems = selectitems;
  }
  
  
  
  @Command
   @NotifyChange("dataList")
   public void addNewItem(){
    Data data = new Data(null, null, null);
    dataList.add(data);
    if(selectitems != null)
    System.out.println(selectitems.size());
   }
   public List&lt;Data&gt; getDataList() {
    return dataList;
   }
  
   public void setDataList(List&lt;Data&gt; dataList) {
    this.dataList = dataList;
   }
  
   public class Data {
    String a;
    String b;
    String c;
    public String getA() {
     return a;
    }
    public String getB() {
     return b;
    }
    public String getC() {
     return c;
    }
    public void setA(String a) {
     this.a = a;
    }
    public void setB(String b) {
     this.b = b;
    }
    public void setC(String c) {
     this.c = c;
    }
    public Data(String a, String b, String c) {
     super();
     this.a = a;
     this.b = b;
     this.c = c;
    }
  
   }
  }
  </code></pre>
  
  <p>Why Set behaving two way in two places?</p>