VLF-ONE Inactivity log off timeout and uQueryCanClose

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
davidbalansa
Posts: 47
Joined: Mon Feb 01, 2016 10:08 am
Location: Australia

VLF-ONE Inactivity log off timeout and uQueryCanClose

Post by davidbalansa » Mon Jan 23, 2017 11:30 am

My VLF-ONE application uses the Inactivity log off timeout. I also have a command handler that detects the command handler is closing without saving the changes and prompts the user if they want to continue without saving.
Capture1.JPG
Capture1.JPG (21.55 KiB) Viewed 1231 times
When the inactivity timeout occurs the message is displayed. But no matter what button is clicked, you will be taken to the timeout message.
Capture2.JPG
Capture2.JPG (12.87 KiB) Viewed 1231 times

Is there a property I can query in the uQueryCanClose method so I can suppress the message box so it will go directly to the timeout message when the logoff timeout triggers.

David.

MarkD
Posts: 625
Joined: Wed Dec 02, 2015 9:56 am

Re: VLF-ONE Inactivity log off timeout and uQueryCanClose

Post by MarkD » Mon Jan 23, 2017 5:21 pm

Your uQueryCanClose method shoudl have a boolean parameter Canbecancelled passed to it.

If this is passed false then you cannot cancel the close and must always return parameter Allow (to be closed) as True

You can however do things that do not require user interaction before returning control.

You should find that in this case that Canbecancelled is passed in as false - so don't display your message in that case.

davidbalansa
Posts: 47
Joined: Mon Feb 01, 2016 10:08 am
Location: Australia

Re: VLF-ONE Inactivity log off timeout and uQueryCanClose

Post by davidbalansa » Mon Jan 23, 2017 10:17 pm

Hi Mark,

Thank you for the response. The Canbecancelled parameter solved my issue.

David

Post Reply