Frontend refresh flag in VdcQueryParameterBase

Hi, For anyone working with the Frontend, please note the following gotcha you need to be aware of. Whenever you create a query parameter, please think about whether or not your query should refresh the user session. Guidelines for when to refresh. Any query that is a result of a user action, like clicking a button to open a pop-up, switch main/sub tabs. A refresh button on a dialog. When not to refresh. Any queries that are generated automatically, like the automatic refresh of grids or display forms. Also queries created in response to some data coming from the back-end. For instance the user clicked and opened a sub tab, the initial query generates the refresh query, but there are some subsequent queries that need to get extra information. Those do NOT need to have the refresh set to true. By DEFAULT the flag is set to true for historical reasons. So any new queries you create will also have the flag set to true. We have implemented a convenient method in VdcQueryParameterBase to allow you to switch the flag off. Often you will do something like 'new VdcQueryParameter(something)' inside a runQuery call. You can do 'new VdcQueryParameter(something).withoutRefresh()' to turn the refresh off, without having to make a temporary variable. If you don't follow the guidelines it is possible (and has happened, which prompted this email) that while a user is inactive your query is keeping the session alive and will cause the automatic log-out to not happen. This is usually not what we want. Thanks, Alexander
participants (1)
-
Alexander Wels