| 167 |
ashish |
1 |
package in.shop2020.hotspot.dashbaord.client;
|
|
|
2 |
|
|
|
3 |
import org.enunes.gwt.mvp.client.EventBus;
|
|
|
4 |
|
|
|
5 |
import in.shop2020.hotspot.dashbaord.client.event.SubmitLoginInfoEvent;
|
|
|
6 |
import in.shop2020.hotspot.dashbaord.client.event.SubmitLoginInfoHandler;
|
|
|
7 |
import com.google.gwt.core.client.EntryPoint;
|
|
|
8 |
import com.google.gwt.core.client.GWT;
|
|
|
9 |
import com.google.gwt.user.client.ui.RootLayoutPanel;
|
|
|
10 |
import com.google.gwt.user.client.ui.RootPanel;
|
|
|
11 |
|
|
|
12 |
/**
|
|
|
13 |
* Entry point classes define <code>onModuleLoad()</code>.
|
|
|
14 |
*/
|
|
|
15 |
public class HotspotDashboard implements EntryPoint {
|
|
|
16 |
|
|
|
17 |
/**
|
|
|
18 |
* This is the entry point method.
|
|
|
19 |
*/
|
|
|
20 |
public void onModuleLoad() {
|
|
|
21 |
final in.shop2020.hotspot.dashbaord.client.gin.Injector ginjector = GWT.create(in.shop2020.hotspot.dashbaord.client.gin.Injector.class);
|
|
|
22 |
|
|
|
23 |
final MainPresenter mainPresenter = ginjector.getMainPresenter();
|
|
|
24 |
|
|
|
25 |
mainPresenter.bind();
|
|
|
26 |
|
|
|
27 |
RootLayoutPanel.get().add(mainPresenter.getDisplay().asWidget());
|
|
|
28 |
|
|
|
29 |
logEvent(ginjector.getEventBus());
|
|
|
30 |
}
|
|
|
31 |
|
|
|
32 |
private void logEvent(EventBus eventBus) {
|
|
|
33 |
eventBus.addHandler(SubmitLoginInfoEvent.getType(), new SubmitLoginInfoHandler() {
|
|
|
34 |
|
|
|
35 |
@Override
|
|
|
36 |
public void onSubmitLoginInfo(SubmitLoginInfoEvent event) {
|
|
|
37 |
GWT.log("Auth called with params "+ event.getUserName() + " and "+ event.getPassword());
|
|
|
38 |
}
|
|
|
39 |
});
|
|
|
40 |
|
|
|
41 |
}
|
|
|
42 |
}
|