Author:Brendon Upson
Email:bupson at wnc.net.au
Subject:Yes. HTMLDocumentItem class
Category:Development
Message:

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); 


Threads:
Can I make a dynamic list using p-tags?   Steve Jones 17.May.07
    Yes. HTMLDocumentItem class   Brendon Upson 17.May.07
        RE: Yes. HTMLDocumentItem class   Brendon Upson 21.Jan.08