| Line 25... |
Line 25... |
| 25 |
interface CatalogBinder extends UiBinder<DockLayoutPanel, CatalogDashboard> {
|
25 |
interface CatalogBinder extends UiBinder<DockLayoutPanel, CatalogDashboard> {
|
| 26 |
}
|
26 |
}
|
| 27 |
|
27 |
|
| 28 |
private static final CatalogBinder binder = GWT.create(CatalogBinder.class);
|
28 |
private static final CatalogBinder binder = GWT.create(CatalogBinder.class);
|
| 29 |
private final LoginServiceAsync loginService = GWT.create(LoginService.class);
|
29 |
private final LoginServiceAsync loginService = GWT.create(LoginService.class);
|
| 30 |
|
30 |
public String uname;
|
| 31 |
@UiField TopPanel topPanel; // logo, welcome message and sign out link
|
31 |
@UiField TopPanel topPanel; // logo, welcome message and sign out link
|
| 32 |
@UiField Shortcuts shortcuts; // anchors to filter item list based on status
|
32 |
@UiField Shortcuts shortcuts; // anchors to filter item list based on status
|
| 33 |
//TODO @UiField Filters filters;
|
33 |
//TODO @UiField Filters filters;
|
| 34 |
@UiField ItemList itemList; // list of items
|
34 |
@UiField ItemList itemList; // list of items
|
| 35 |
@UiField ItemDetails itemDetails; // details of an item selected in the list
|
35 |
@UiField ItemDetails itemDetails; // details of an item selected in the list
|
| Line 60... |
Line 60... |
| 60 |
* @param password
|
60 |
* @param password
|
| 61 |
* @param role -- Utils.ROLE_STAGING (Login role for staging), another role
|
61 |
* @param role -- Utils.ROLE_STAGING (Login role for staging), another role
|
| 62 |
* is Utils.ROLE_PRODUCTION (for push to production username & password)
|
62 |
* is Utils.ROLE_PRODUCTION (for push to production username & password)
|
| 63 |
*/
|
63 |
*/
|
| 64 |
private void authenticateUser(String username, String password, int role) {
|
64 |
private void authenticateUser(String username, String password, int role) {
|
| 65 |
final String uname = username;
|
65 |
uname = username;
|
| 66 |
loginService.authenticateUser(username, password, role, new AsyncCallback<String>() {
|
66 |
loginService.authenticateUser(username, password, role, new AsyncCallback<String>() {
|
| 67 |
@Override
|
67 |
@Override
|
| 68 |
public void onSuccess(String result) {
|
68 |
public void onSuccess(String result) {
|
| 69 |
if (result != null) {
|
69 |
if (result != null) {
|
| 70 |
GWT.log(result + " logged in catalog dashboard");
|
70 |
GWT.log(result + " logged in catalog dashboard");
|