XPages question: only one common set of data events for multiple data sources?

I’m having this XPage containing document data from two different datasources. Now I plan to do some calculations upon saving the Xpage.

Since designer shows me complete sets of data events for each of my data sources I expected that I could use separate codes for each datasource’s querySaveDocument.

But to my surprise both querySaveDocument events appear to be in sync all of the time: changing JS code on one datasource the code of the other is changed accordingly and immediately.

Since I didn’t find any info on that so far: is that wanted behaviour? If so: why is designer showing separate event sets then? Or am I just missing something?

Subject: RE: XPages question: only one common set of data events for multiple data sources?

Hi…

I took a look at this, it appears to be only a UI bug, in that the correct information is entered onto the XPage. It appears when you change focus from one data source to another in the Events panel, but at the same time you select an event with the same name as the previous event the Events panel does not update.

This issue has been reported to Development.

In the meantime is to select an event by a different name in the events panel as this will cause the UI to update.

Thanks for your feedback.

Subject: Confirmed, thanks. Still one more question, though…

Sorry, didn’t look at the source code. So, as a workaround I pulled both event codes into one datasource event. Now, your answer brought up a nwe question:

are similar events executed in parallel threads or are they running in some predictable order where one would wait for the other to finish?

Example:

assume if I have 2 datasources on one XPage and there is some code in both querySaveDocument events. Now if both codes would try to change the same data set, what would happen? Is one executed after the other? If so, can we tell which one comes first?

Or would both be executed at “the same time” / in parallel threads?

Thanks,

-Lothar

Subject: RE: Confirmed, thanks. Still one more question, though…

Now that is an excellent question :slight_smile: I am not 100% sure of the answer, I will get back to you ASAP… Just want to be sure before answering.

Watch this space!

Subject: Any news about my question yet?

Hi,

Now that is an excellent question :slight_smile: I am not

100% sure of the answer, I will get back to

you ASAP… Just want to be sure before

answering.

Watch this space!

did you already find the time to investigate?

regards,

-Lothar

Subject: Still a bug in 8.5 GOLD…

I’m aware that bugs like these have a minor priority but seeing they’re still there is quite disppointing…

Or could it be that something went completely wrong with my GOLD installation?