This example walks you through building a multi file upload Custom Control that uses a central attachment repository db for all the attachments. The application has very little code and utilizes the Repeat control and Panel control to generate an unlimited amount of uploads per XPage. (Actually, I am sure there is a limit but I have not hit it yet.) The step by step instructions are in the article as well as a download of the example database(s).
XPage Custom Controls allow you to build your own controls for reuse. They show up in the control palette and can be dragged and dropped on any page just like any of the other controls. The concept is similar to a subform in Domino.
Let's start out with a look at the completed custom control in Domino Designer:
1- Screen shot of the control in Domino Designer
After dropping it on an XPage, here is a screen shot of the control in use. You can see that 3 files have been uploaded already and the user clicked the "Add New Upload" button a 4th time and is presented with a blank upload control plus a description field:
2- Screen shot of the control on an XPage in a browser
You can drop this control anywhere on your page(s). The only additional item that is needed on your page is a field calculating the document's docUNID.
Read the full article and download the sample at John Mackey's blog