title: Get arrayList populated on event values from backing bean
body: <p>i populate my arrayList on onDrop event, now when I try to retrieve it via javascript, it does not have any value</p>
  
  <p>backing bean:</p>
  
  <pre><code>List&lt;String&gt; arr..
   public void onDrop(DragDropEvent event) {
      arr.add(event.getDragId());
  }
  </code></pre>
  
  <p>jsf code:</p>
  
  <pre><code>&lt;h:inputHidden id="hidden" value=#{bean.arr}/&gt;
  </code></pre>
  
  <p>javascript function:</p>
  
  <pre><code>function get(){
   var a = document.getElementById("hidden");
   alert(a.value);
  }
  </code></pre>
  
  <p>alert returns <code>[]</code> but I have now a populated arrayList after onDrop is fired several times but it seems that it does not get the values. how can i retrieve those values in the arrayList?</p>
  
  <p>EDIT:</p>
  
  <p>here's the one using the onDrop event</p>
  
  <pre><code>&lt;p:outputPanel id="op" ... &gt; 
  &lt;p:droppable ... &gt;
  &lt;p:ajax ... listener="#{bean.onDrop}"/&gt;
  </code></pre>