I'd like to add a list of strings to a Dialog list with an Java agent. Item's value changes but it doesn't show the values on form.
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);
replaceItemValue()only replaces the value of a field in the current document (which you got viaagentContext.getDocumentContext()) and not the choices that, for example, a Combobox tied to that field offers the user.If the choices a Combobox offers are static you need to use Domino Designer to open the form the document is based on and change the values offered for the choices in that field. If you want to do that programmatically, you would have to work with DXL.