Data page is loaded in thread before onClick

Hi,

I have a section that calls a when rule with a parameterized data page when clicking on a button. On entering the flow action that contains the section, I see that the data page is already loaded in the thread. I would expect that the data page got loaded onClick(), not on entering the flow action / loading the section. Why does this work as described?

Kind regards,
Bas

For interested parties: this occured in Pega Mashup. Because the screen with the button was rendered, the when condition was triggered. We solved this by writing JS on a section include with the custom HTML option enabled.