HTMLDocumentItem hdi = new HTMLDocumentItem(ActionDocument, "<P@List name=\"YourField\" @P>");
String sChoiceArray[] = new String[]{"s1", "s2", "s3"}; ActionDocument.setItemChoices("YourField", sChoiceArray);
StringBuffer sHTML = hdi.getHTML(false); //sHTML is the html required to make the combo box, this can then be put in a computed field on a page. //you can also change the name of the field dynamically: hdi.setName("NewFieldName"); Alternatively you can also use a temporary document rather than ActionDocument, eg: HTMLDocument docTemp = new HTMLDocument(pSystem, pSession); |