Subversion Repositories SmartDukaan

Rev

Rev 2209 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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
 
11
/**
12
 * Entry point classes define <code>onModuleLoad()</code>.
13
 */
14
public class HotspotDashboard implements EntryPoint {
15
 
16
		/**
17
	 * This is the entry point method.
18
	 */
19
	public void onModuleLoad() {
20
		final in.shop2020.hotspot.dashbaord.client.gin.Injector ginjector = GWT.create(in.shop2020.hotspot.dashbaord.client.gin.Injector.class);
21
 
22
		final MainPresenter mainPresenter = ginjector.getMainPresenter();
23
 
24
		mainPresenter.bind();
25
 
26
		RootLayoutPanel.get().add(mainPresenter.getDisplay().asWidget());
27
 
28
		logEvent(ginjector.getEventBus());
29
	}
30
 
31
	private void logEvent(EventBus eventBus) {
32
		eventBus.addHandler(SubmitLoginInfoEvent.getType(), new SubmitLoginInfoHandler() {
33
 
34
			@Override
35
			public void onSubmitLoginInfo(SubmitLoginInfoEvent event) {
36
				GWT.log("Auth called with params "+ event.getUserName() + " and "+ event.getPassword());
37
			}
38
		});
39
 
40
	}
41
}