Hello Alpha Anywhere people,
I am trying to create a timer that sets a panel once the timer has completed. I figure that the best way to do this would be through javascript, but maybe I'm on the wrong page here. I currently have an embedded UX component in a panel card on my main UX component, and in the UX component's afterValidate function, I have a function that sets the active panel back to my first panel card. This does not work, and I suspect that part of it is because the embedded UX component does not contain the panel cards, so as far as AA is concerned, there is no panel to switch to. I noticed that there is an onTimer function in the server-side events for the embedded UX component, but I face the same issue of not being able to set the active panel card. On top of that, I have not figured out to set the interval for the onTimer function.
Any suggestions are welcome, thank you in advance.
EDIT
Of course after banging my head on this for over an hour, I finally figured it out. Here is what I did, and maybe someone can let me know if it is the best way to do so. After restarting AA I was able to have access to the "OnTimer event interval" property on my embedded UX component. Then I was able to create a new Action Javascript function in the onTimer client-side event that would open a UX component (my main menu) in the current panel. This seems to work, but it seems a little hacky to open the UX component that is containing the embedded component.
EDIT2
I spoke too soon. Once the embedded UX component loads the main menu, the timer continues to run and will reload the main menu every 3 seconds regardless of what panel card I am in at that point.
I am trying to create a timer that sets a panel once the timer has completed. I figure that the best way to do this would be through javascript, but maybe I'm on the wrong page here. I currently have an embedded UX component in a panel card on my main UX component, and in the UX component's afterValidate function, I have a function that sets the active panel back to my first panel card. This does not work, and I suspect that part of it is because the embedded UX component does not contain the panel cards, so as far as AA is concerned, there is no panel to switch to. I noticed that there is an onTimer function in the server-side events for the embedded UX component, but I face the same issue of not being able to set the active panel card. On top of that, I have not figured out to set the interval for the onTimer function.
Any suggestions are welcome, thank you in advance.
EDIT
Of course after banging my head on this for over an hour, I finally figured it out. Here is what I did, and maybe someone can let me know if it is the best way to do so. After restarting AA I was able to have access to the "OnTimer event interval" property on my embedded UX component. Then I was able to create a new Action Javascript function in the onTimer client-side event that would open a UX component (my main menu) in the current panel. This seems to work, but it seems a little hacky to open the UX component that is containing the embedded component.
EDIT2
I spoke too soon. Once the embedded UX component loads the main menu, the timer continues to run and will reload the main menu every 3 seconds regardless of what panel card I am in at that point.