To add a list of form items to a form, while the number of items are not known, you can use following code:
Vector<formitem> items = new Vector<formitem>();
TextItem textItem1 = new TextItem();
items.add(textItem1);
...
TextItem textItem2 = new TextItem();
items.add(textItem2);
...
FormItem[] formItems = new FormItem[items.size()];
items.toArray(formItems);
form.setItems(formItems);
No comments:
Post a Comment