Stopping a form from timing out

View and download documents on various topics e.g. Configuring Ebase Xi under different environmental setups

Moderators: Jon, Steve, Ian, Dave

neilnewman
Ebase User
Posts: 201
Joined: Fri Dec 20, 2013 1:29 pm
Location: Dartford Borough Council
Contact:

Stopping a form from timing out

#1

Postby neilnewman » Mon Oct 09, 2017 11:32 am

We are in the process of creating an application using Ebase to replace our current CRM system.

Unlike a standard Ebase form we would not want this form to timeout, the operatives would want this form/application to be open all day.
I see there is a couple of previous posts about this subject, but we would like to know the best way to go about this under Ebase 5.2.

We don't want to remove the timeout feature from all our other forms, so a system configuration change would not be what we are looking for.
0 x

User avatar
Wai
Moderator
Moderator
Posts: 165
Joined: Wed Sep 12, 2007 9:04 am
Location: Sandy, UK
Contact:

Re: Stopping a form from timing out

#2

Postby Wai » Mon Oct 09, 2017 11:59 am

You can periodically make a client-server API call.
  • Define a Client Callable function in a script
  • Add the script to Client Callable Functions on the Form's Events
  • Have a client side script that calls the function on a timed basis
0 x

neilnewman
Ebase User
Posts: 201
Joined: Fri Dec 20, 2013 1:29 pm
Location: Dartford Borough Council
Contact:

Re: Stopping a form from timing out

#3

Postby neilnewman » Mon Oct 09, 2017 1:22 pm

Hi Wai,
I don't suppose you happen to have an example to hand, we don't have much in the way of Javascript skills here!

Thanks
Neil
0 x

User avatar
Wai
Moderator
Moderator
Posts: 165
Joined: Wed Sep 12, 2007 9:04 am
Location: Sandy, UK
Contact:

Re: Stopping a form from timing out

#4

Postby Wai » Mon Oct 09, 2017 5:24 pm

Hi Neil,

There's an even easier way to do this.

In the HttpSession interface you can set the Max Inactive interval
For example, in a before form script you can have:

Code: Select all

client.httpSession.maxInactiveInterval = 10; // Where 10 is seconds
So you can set the seconds you want to keep the session alive. For example 10 hours (36000) etc.

From the Javadoc
setMaxInactiveInterval

void setMaxInactiveInterval(int interval)
Specifies the time, in seconds, between client requests before the servlet container will invalidate this session. A negative time indicates the session should never timeout.
Parameters:
interval - An integer specifying the number of seconds
1 x

neilnewman
Ebase User
Posts: 201
Joined: Fri Dec 20, 2013 1:29 pm
Location: Dartford Borough Council
Contact:

Re: Stopping a form from timing out

#5

Postby neilnewman » Tue Oct 10, 2017 10:03 am

Hi Wai,
Many thanks for your help, it works a treat.
0 x

User avatar
Wai
Moderator
Moderator
Posts: 165
Joined: Wed Sep 12, 2007 9:04 am
Location: Sandy, UK
Contact:

Re: Stopping a form from timing out

#6

Postby Wai » Tue Oct 10, 2017 3:36 pm

No problem
0 x


Who is online

Users browsing this forum: No registered users and 6 guests