public class LoginController
extends java.lang.Object
Constructor and Description |
---|
LoginController() |
Modifier and Type | Method and Description |
---|---|
protected void |
displayActionCenter()
Navigates to the staff action center view using the
router . |
protected void |
displayClientActionCenter()
Navigates to the client action center view using the
router . |
protected void |
displayInternalErrorAlert(java.lang.Exception e)
Displays an alert popup to the user indicating an expected
error occurred.
|
void |
loginClient()
This method tries to log in a client based on the value present in the
clientIdField . |
void |
loginStaff()
This method tries to log in a staff member based on the values
that are present in the
usernameField and passwordField . |
public void loginStaff()
usernameField
and passwordField
.
Value of the username field will be trimmed before being used.
If the authentication fails, a call to either Alerts.failure(String)
or displayInternalErrorAlert(Exception)
will be displayed to
the user (based on the received exception).
This method is called by a click event triggered by the
loginButtonStaff
button.
protected void displayActionCenter()
router
.protected void displayClientActionCenter()
router
.protected void displayInternalErrorAlert(java.lang.Exception e)
e
- the exception to show the detail of in the popuppublic void loginClient()
clientIdField
.
Value of the client ID field will be trimmed before being used.
If the authentication fails, a call to either Alerts.failure(String)
or displayInternalErrorAlert(Exception)
will be displayed to
the user (based on the received exception).
This method is called by a click event triggered by the
loginButtonStaff
button.