Longrange container
Longrange container
I have a VLWEB application running in a webview in longrange. The user initially signs on to a longrange page then goes to the vlweb from the menu. If the session expires I'd like to go back to the longrange page but this would require the vlweb app to signal an event that would be heard by the longrange page hosting the webview. Is there anyway to do something like this?
Re: Longrange container
Hi Jim,
I'd like to know if the "session" here means a web page session? Do you means you need to fire an event when a web page session expires?
Thanks
Jason
I'd like to know if the "session" here means a web page session? Do you means you need to fire an event when a web page session expires?
Thanks
Jason
Re: Longrange container
Jason
In my application the longrange container hosts a number of apps. It provides a sign on page, then a menu of apps most of which are longrange apps so I have no issues with them. Our newer apps are VLWEB, I have a longrange page with a full screen webview. Only the longrange title bar with the home button remains. Inside VLWEB app we have our own session management based on a session file on the host. Each time we make a server call we check how long it has been since the last interaction. After 15 minutes of inactivity the session is flagged as expired and the server module returns this to the VLWEB app. My question is how do I notify the longrange page (with the webview) that I wish to to return to the sign on page? Currently after we tell the user the session has expired they have to click home button which returns them to our longrange menu page which detects the expired status and then displays the sign on page. Bottom line - if a VLWEB page is hosted on a longrange page how can be communicate with the hosting page,
In my application the longrange container hosts a number of apps. It provides a sign on page, then a menu of apps most of which are longrange apps so I have no issues with them. Our newer apps are VLWEB, I have a longrange page with a full screen webview. Only the longrange title bar with the home button remains. Inside VLWEB app we have our own session management based on a session file on the host. Each time we make a server call we check how long it has been since the last interaction. After 15 minutes of inactivity the session is flagged as expired and the server module returns this to the VLWEB app. My question is how do I notify the longrange page (with the webview) that I wish to to return to the sign on page? Currently after we tell the user the session has expired they have to click home button which returns them to our longrange menu page which detects the expired status and then displays the sign on page. Bottom line - if a VLWEB page is hosted on a longrange page how can be communicate with the hosting page,
Re: Longrange container
Hi Jim,
Thanks for your detailed explanation. There are a couple of JavaScript APIs in Webview that can make web page to communicate with LongRange.
For example, in your VLWeb page, you can create a widget and run the following JavaScript code to open the main menu:
Thanks
Jason
Thanks for your detailed explanation. There are a couple of JavaScript APIs in Webview that can make web page to communicate with LongRange.
For example, in your VLWeb page, you can create a widget and run the following JavaScript code to open the main menu:
Code: Select all
function openMenu(){
LONGRANGE.Form.runOperation({
operation: {
type: "ClientCommand",
Command: "MAINMENU"
}
});
}
Jason
Re: Longrange container
Thanks Jason
I've implemented your suggestion and it does what you suggested - it pops up the system menu.
Is there other commands available - eg can I do something like:
#com_owner.SwitchToFormView Named("BOSMB0000")
#com_owner.SwitchRequestPROGRAM := 'BOSMB0000'
#com_owner.SwitchRequestACTION := 'SESSIONLOGOFF'
I've implemented your suggestion and it does what you suggested - it pops up the system menu.
Is there other commands available - eg can I do something like:
#com_owner.SwitchToFormView Named("BOSMB0000")
#com_owner.SwitchRequestPROGRAM := 'BOSMB0000'
#com_owner.SwitchRequestACTION := 'SESSIONLOGOFF'
Re: Longrange container
Hi Jim,
You can run PerformAction or OpenForm operation in Javascript, for example:
Thanks
Jason
You can run PerformAction or OpenForm operation in Javascript, for example:
Code: Select all
function performAction(){
LONGRANGE.Form.runOperation({
operation: {
type: "PerformAction",
Pgm: "BOSMB0000",
Action: "SESSIONLOGOFF"
}
});
}
Code: Select all
function openForm(){
LONGRANGE.Form.runOperation({
operation: {
type: "OpenForm",
Name: "BOSMB0000"
}
});
}
Thanks
Jason
Re: Longrange container
Exactly what I needed. Thanks Jason.
Cheers
Jim
Cheers
Jim