title: How can I display the result of an LDAP query (in my case a list of OUs), done with some Java code, in a IBM Notes Dialog List?
body: <p>I'd like to add a list of strings to a <code>Dialog list</code> with an Java agent. Item's value changes but it doesn't show the values on form.</p>
  
  <pre class="lang-java prettyprint-override"><code>Session session = getSession(); 
  AgentContext agentContext = session.getAgentContext();
  Database db=session.getCurrentDatabase();
  Form form = db.getForm("UOs_AD");
  Document document = agentContext.getDocumentContext();
  Item item = document.getFirstItem("UO_AD");
  Vector v = new Vector();
  v.addElement("Bicycle");
  v.addElement("Train");
  v.addElement("Foot");
  Item textListItem = document.replaceItemValue("UO_AD", null);
  textListItem.setValues(v);
  textListItem.setSummary(true);
  document.save(true, true);
  </code></pre>