Update of non-persistent entity possible on page?

1
Hi everybody, I've the following case. An entity list contains a number attribute (hours for example). Using the master-detail view, a user can adjust those hours. I have a non-persistent entity on the page (no association whatsoever)  which is instantiated and calculated using a datasource microflow. It shows the total amount of hours of all the records.  When the user changes one of the records and reduces the hours, the non-persistent entity should reflect this change. Unfortunately this only happens when I refresh the page. The non-persistent entity is not redetermined on the page when I update an entry. Any hints/tips how to make this behaviour work? I can imagine creating the association of the non-persistent object to each line in the table and perform the calculation every time when an update occurs and then showing the non-persistent object of that line using a listentwidget, but not sure if that is the best way to go. Hope you can help! All the best Laurens
asked
1 answers
4

Hi,

you could link that NPE to the $currentSession. Whenever a user changes a record you can then retrieve it from the Session again and do a Change(refresh) Action.

regards, Fabian

answered