Save all data sources associated with XPage

I have Custom Control A with a DominoView databaseource and a repeat control repeating Custom Control B. Custom Control B has a DominoDocument datasource using the editDocument action and with the documentId property set by the repeat in Custom Control A. The intention is to allow users to update multiple documents in a single UI.

I have various buttons for navigating which save the datasources using the “Save Data Sources” simple action. If I have the buttons in Custom Control A, it successfully saves al datasources in Custom Control B.

However, I would like to have the buttons top and bottom of my page. So I want to put the button code in a Custom Control of its own, to insert in Custom Control A and Custom Control B. However, it appears the “Save Data Sources” simple action only savess datasources in the relevant custom control or child custom controls.

Does anyone have any ideas on how I could consolidate my button code to save all datasources in all custom controls for the overall XPage?

I suspect it is not going to be possible and I will have to put up with repeated code, but if anyone has any ideas, it would be great.

Thanks

Paul

Subject: did you try script?

Just calling the global function save() ??? Does that do it?

Howard

Subject: Global Save()

Great, yes, that works.

Thanks for pointing me in that direction, I hadn’t thought to look at those.

Paul