I have a login(window) screen and menu which is viewport in my application. In my menu, I have LogOff button. On click of the button I wanted to remove the viewport and display the Login screen.
I am using the below code in the LogOff button click event
The above code while executing calls the "afterlayout" event of the viewport and gives error.