Getting NullPointerException when opening loginWindow from button click

Hi,

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.

null%20exception

Any help on how to achieve this.

Sample

sampleProject (2).zip (464.1 KB)

Hi,

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

App.getInstance().navigateTo('loginWindow');

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

Hi,

@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

Unexpected%20error