Hi Marco,
the cause of this is that you have the forms inside a webblock, and webblocks inside an if, are removed from the DOM on False, and added again on True, at that point the webblock is running all its events from the start, so it is executing the aggregate retrieving data from the database.
You don't really need to serialize and save data into client variables for this. If you want to stick to the design of having the different parts of your detail screen in a separate webblock, you take them outside of an if, and give the container they are in a dynamic style of 'display: none', either by an inline style or a class.
with an inline style :
with a class :


Contrary to an If widget or the Visible property, this does not remove your webblock from the DOM, and so on becoming visible again, it doesn't refresh data but is still showing what you have changed.
Dorine