1
votes

I am using Domino 9.0.1 and I am developing an XPage application to act as a time sheet. In an entry page, I have a repeater where I have one custom control repeated 10+ times. Each control has its own Java Object (stored in an ArrayList on the page) and its own NotesXspDocument data source. I am using a custom control in order to 1) maintain a constant look and feel throughout the entire application, 2) if changes need to be made to functionality or to design they should be made in one location and not multiple throughout the application 3) i feel that such object oriented styles is just best practice.

My issue is this. Each instance of the control can save itself. It has direct access to its dataSource (NotesXspDocument), and I have had no issues with such designs in the past. Because of the repeater, I want to be able to give the user the opportunity to click on one save button on the page, and then iterate through each custom control instance and tell it to save its datasource without making the user click on save 10 to 20 times. All of the searches that I have made for such a task only return giving a custom control access to a page's datasource, or for passing a function to the custom control and not giving an xpage access to an internally defined function.

Does anyone know if this is possible?

The other idea that I could play with is adding a DominoDocument to the background java class and then telling the Java class to save itself.

Any suggestions?

Thank you very much in advance for any advice and help!

Greg

1
if you add a button of type "Submit", I believe it will save all data sources at once.Per Henrik Lausten
interestingly enough, a button with a simple action of save data sources will save all of instances. I am hoping to expand this though to include other possible functions other than save. Also, I would like to use this in an extension library toolbar so that I am not stuck with a normal button. Are you aware of any other possibility to fire such a function, or to listen for it?Greg
use the OpenNTF spreadsheet controlsstwissel

1 Answers

2
votes

If you add a button of type "Submit" it will save all data sources at once.