Signal event from View to Main Web Page
Posted: Thu Jul 28, 2022 3:24 am
I have an odd issue with SIGNAL EVENT, that maybe someone can lend some help.
In VL Web, I want to navigate from one View to a different View. I was originally using the #SYS_WEB.Routing.Navigate, but this was not always working correctly, and Lansa support said to use Signal events back to the Main Web page, and have all navigation be performed from it.
OK, in my test VL app (simple, no log in required) all works fine.
In my work VL Web app, I have basically the same set of code, but the Main Web page does not respond or seen to even recognize the signaled event?
The one big difference between my work app, and the test app, is that in the work app it is login protected. Is anyone aware of access protected, protected routing having an impact on Signal events?
Here is what I have in my View to trigger the Signal Event (Marco)
* Defined the Signal event to return to Main page for Autoplay
DEFINE_EVT Name(GoToNextAP)
* Signal event triggered from MthRoutine (not Evtroutine)
MTHROUTINE Name(GoToNextTopic)
SIGNAL Event(GoToNextAP)
ENDROUTINE
Then in my Main Page, here is where I am expecting to respond to the Signal Event (Polo)
* Views with signal events - Polo to listen for signaled events
DEFINE_COM Class(#KX2Welcome) Name(#Welcome)
EVTROUTINE Handling(#Welcome.GoToNextAP)
* Console - debug
#sys_web.Console.Log( ('LINE-182 KX2Main: ' + ' - ' + #KX2SessionProperties.UserNextTopic) )
* Pause to let any component finish before navigating to new view
#Timer1.Start
ENDROUTINE
EVTROUTINE Handling(#Timer1.Tick)
* test timer delay
#Timer1.Stop
* Navigate to new view
#SYS_WEB.Routing.Navigate Path('/' + #KX2SessionProperties.UserNextTopic)
ENDROUTINE
When I execute the VL web app, and GoToNextAP signal event from the View is triggered, the sys_web.console message never is populated, and the navigation does not happen. No errors that I can find, it just seems to be ignoring the Signal event???
Any help or insight is appreciated.
In VL Web, I want to navigate from one View to a different View. I was originally using the #SYS_WEB.Routing.Navigate, but this was not always working correctly, and Lansa support said to use Signal events back to the Main Web page, and have all navigation be performed from it.
OK, in my test VL app (simple, no log in required) all works fine.
In my work VL Web app, I have basically the same set of code, but the Main Web page does not respond or seen to even recognize the signaled event?
The one big difference between my work app, and the test app, is that in the work app it is login protected. Is anyone aware of access protected, protected routing having an impact on Signal events?
Here is what I have in my View to trigger the Signal Event (Marco)
* Defined the Signal event to return to Main page for Autoplay
DEFINE_EVT Name(GoToNextAP)
* Signal event triggered from MthRoutine (not Evtroutine)
MTHROUTINE Name(GoToNextTopic)
SIGNAL Event(GoToNextAP)
ENDROUTINE
Then in my Main Page, here is where I am expecting to respond to the Signal Event (Polo)
* Views with signal events - Polo to listen for signaled events
DEFINE_COM Class(#KX2Welcome) Name(#Welcome)
EVTROUTINE Handling(#Welcome.GoToNextAP)
* Console - debug
#sys_web.Console.Log( ('LINE-182 KX2Main: ' + ' - ' + #KX2SessionProperties.UserNextTopic) )
* Pause to let any component finish before navigating to new view
#Timer1.Start
ENDROUTINE
EVTROUTINE Handling(#Timer1.Tick)
* test timer delay
#Timer1.Stop
* Navigate to new view
#SYS_WEB.Routing.Navigate Path('/' + #KX2SessionProperties.UserNextTopic)
ENDROUTINE
When I execute the VL web app, and GoToNextAP signal event from the View is triggered, the sys_web.console message never is populated, and the navigation does not happen. No errors that I can find, it just seems to be ignoring the Signal event???
Any help or insight is appreciated.