I’m trying to implement my login screen as in the image below, in which the login box will only appear after a user clicks the login/register button. But it should allow the user to use or do some other functionality without being logged in.
If have tried this in a main window, this there a way i could display this main window first at start up and only call the login screen after user clicks login/register button.
If Possible a sample would really help thank you
com.haulmont.cuba.web.App classes. They handle top level windows management (
naviagateTo(topLevelWindowId)). You can create your cuba_App bean and replace default with your in web-spring.xml.
As you can see there, the classes create topLevelWindow depending on the user authentication state. So you can create new topLevelWindow for unauthenticated users (I think not the best solution), or create special User record in db for unauthenticated users to login them with it on start (don’t use standard system Anonymous user).
With second approach you could specify, what screens unauthenticated user can see, using standard CUBA permissions system.