Getting NullPointerException when opening loginWindow from button click


I am getting this nullpointer exception when trying to open an extended loginWindow screen from a created button.

I have changed my landing screen to be an extended mainWindow screen that has a button login/register and i am trying to call the loginWindow screen from this button. Since the anonymous is the account used to get to this page i have copied the administrator role and set it for anonymous user with access to all screen.


Any help on how to achieve this.


sampleProject (2).zip (464.1 KB)


You cannot show loginWindow as usual window, because it can be shown only by replacing the main one:


That is dangerous, you can implicitly show some data and functionality for non-logged in users.


@artamonov i have used the code you gave me above and now i am getting “Unexpected error Please contact system administrator”.

I have removed adminstrator role and gave anonymous role to anonymous user and allowed access to the loginWindow for anonymous role