litesoft
Diff Revisions
713
vs
733
for /trunk/GWT_Sandbox/MultiModuleSingleSrc/main/src/org/litesoft/sandbox/multimodule/client/main/Main.java
|
@@ -3,6 +3,7 @@ |
3 |
3 |
|
import org.litesoft.GWT.client.pavsupport.*; |
4 |
4 |
|
import org.litesoft.GWT.client.util.*; |
5 |
5 |
|
import org.litesoft.GWT.client.widgets.*; |
|
6 |
+ |
import org.litesoft.core.util.externalization.*; |
6 |
7 |
|
import org.litesoft.sandbox.multimodule.client.foundation.places.*; |
7 |
8 |
|
import org.litesoft.sandbox.multimodule.client.foundation.support.*; |
8 |
9 |
|
import org.litesoft.sandbox.multimodule.client.main.home.*; |
|
@@ -24,7 +25,7 @@ |
24 |
25 |
|
{ |
25 |
26 |
|
System.out.println( "Main.onModuleLoad" ); |
26 |
27 |
|
|
27 |
|
- |
ActivityFactoryRegistry.register( new CachedViewSynchronousActivityFactory<ClientFactory, HomeView, PlaceHome>( EnumPlaces.Home ) |
|
28 |
+ |
ActivityFactoryRegistry.register( new CachedViewSynchronousActivityFactory<ClientFactory, HomeView, PlaceHome>( DefaultResolver.INSTANCE, EnumPlaces.Home ) |
28 |
29 |
|
{ |
29 |
30 |
|
@Override |
30 |
31 |
|
public HomeView createView() |
|
@@ -56,7 +57,7 @@ |
56 |
57 |
|
@Override |
57 |
58 |
|
public void onPhoneGapAvailable( PhoneGapAvailableEvent event ) |
58 |
59 |
|
{ |
59 |
|
- |
startShowCase( phoneGap ); |
|
60 |
+ |
start( phoneGap ); |
60 |
61 |
|
} |
61 |
62 |
|
} ); |
62 |
63 |
|
|
|
@@ -65,14 +66,14 @@ |
65 |
66 |
|
@Override |
66 |
67 |
|
public void onPhoneGapTimeout( PhoneGapTimeoutEvent event ) |
67 |
68 |
|
{ |
68 |
|
- |
Window.alert( "can not load Phonegap\nvs " + VERSION ); |
|
69 |
+ |
Window.alert( "can not load Phone Gap\nvs " + VERSION ); |
69 |
70 |
|
} |
70 |
71 |
|
} ); |
71 |
72 |
|
|
72 |
73 |
|
phoneGap.initializePhoneGap(); |
73 |
74 |
|
} |
74 |
75 |
|
|
75 |
|
- |
private void startShowCase( PhoneGap phoneGap ) |
|
76 |
+ |
private void start( PhoneGap pPhoneGap ) |
76 |
77 |
|
{ |
77 |
78 |
|
NeverEmptyHtmlEscapingLabel zMessageUserSinkLabel = new NeverEmptyHtmlEscapingLabel(); |
78 |
79 |
|
SimplePanel zAppWidget = new SimplePanel(); |
|
@@ -80,12 +81,10 @@ |
80 |
81 |
|
RootPanel.get( "CenteredContent" ).add( zAppWidget ); |
81 |
82 |
|
RootPanel.get( "Message" ).add( zMessageUserSinkLabel ); |
82 |
83 |
|
|
83 |
|
- |
ClientFactoryImpl clientFactory = new ClientFactoryImpl(); // GWT.create( ClientFactory.class ); |
|
84 |
+ |
ClientFactoryImpl clientFactory = new ClientFactoryImpl( new StyledSafeTextMessageUserSink( zMessageUserSinkLabel ) ); |
84 |
85 |
|
PlaceChangerWithCurrentUrlSupport pam = new PlaceActivityManager<ClientFactory>( zAppWidget, clientFactory ); |
85 |
86 |
|
clientFactory.setPlaceChanger( pam ); |
86 |
|
- |
clientFactory.setMessageUserSink( new StyledSafeTextMessageUserSink( zMessageUserSinkLabel ) ); |
87 |
87 |
|
|
88 |
|
- |
// Goes to the place represented on URL else default place |
89 |
|
- |
pam.goToCurrentUrl(); |
|
88 |
+ |
pam.goToCurrentUrl(); // Goes to the place represented on URL else default place |
90 |
89 |
|
} |
91 |
90 |
|
} |