Subversion Repository Public Repository

litesoft

Diff Revisions 954 vs 955 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/view/ViewManagerImpl.java

Diff revisions: vs.
  @@ -5,8 +5,9 @@
5 5 import org.litesoft.GWT.client.widgets.*;
6 6 import org.litesoft.bo.views.*;
7 7 import org.litesoft.commonfoundation.base.*;
8 - import org.litesoft.core.*;
8 + import org.litesoft.commonfoundation.independence.*;
9 9 import org.litesoft.security.*;
10 + import org.litesoft.commonfoundation.independence.*;
10 11 import org.litesoft.uispecification.*;
11 12
12 13 import com.google.gwt.event.logical.shared.*;
  @@ -35,7 +36,7 @@
35 36 Confirm.isNotNull( "(Dialog) ViewDef", pViewDef );
36 37 ViewFactory zFactory = getViewFactory( pViewDef );
37 38 if ( zFactory instanceof DialogViewFactory ) {
38 - new DialogViewDialog( ((DialogViewFactory) zFactory).createDialog( ClientContext.get(), pParams ) ).show();
39 + new DialogViewDialog( ((DialogViewFactory) zFactory).createDialog( pParams ) ).show();
39 40 } else {
40 41 AlertManager.alert( "ViewManager", "No Dialog Factory", "No Dialog for: " + pViewDef );
41 42 }
  @@ -69,7 +70,7 @@
69 70 }
70 71
71 72 if ( mAccessControlManager.loginRequired() ) {
72 - LoginServerStateChecker zChecker = ClientContext.get().checkGet( LoginServerStateChecker.class );
73 + LoginServerStateChecker zChecker = Instance.ofOptional( LoginServerStateChecker.class );
73 74 if ( zChecker == null ) {
74 75 requestUserLogin( pHistoryToken, null );
75 76 } else {
  @@ -87,13 +88,13 @@
87 88 return;
88 89 }
89 90
90 - LoginPasswordResetAccessor zAccessor = ClientContext.get().get( LoginPasswordResetAccessor.class );
91 + LoginPasswordResetAccessor zAccessor = Instance.of( LoginPasswordResetAccessor.class );
91 92 if ( zAccessor.isPasswordResetRequired() ) {
92 - LoginPasswordResetDialogViewFactory zFactory = ClientContext.get().get( LoginPasswordResetDialogViewFactory.class );
93 + LoginPasswordResetDialogViewFactory zFactory = Instance.of( LoginPasswordResetDialogViewFactory.class );
93 94 if ( zFactory != null ) {
94 95 DialogView zView =
95 - zFactory.createDialog( ClientContext.get(), new LoginSuccessCommand( pHistoryToken, mNextScreenProperties, "Password updated" ) );
96 - ClientContext.get().get( SingleWidgetPanel.class ).setWidget( new SizeableSpacer().stretchable() );
96 + zFactory.createDialog( new LoginSuccessCommand( pHistoryToken, mNextScreenProperties, "Password updated" ) );
97 + Instance.of( SingleWidgetPanel.class ).setWidget( new SizeableSpacer().stretchable() );
97 98 new DialogViewDialog( zView ).show();
98 99 return;
99 100 }
  @@ -122,7 +123,7 @@
122 123 throw new IllegalStateException( "No Screen for: " + zViewDef );
123 124 }
124 125
125 - StatusMessageSinc zMessageSinc = ClientContext.get().checkGet( StatusMessageSinc.class );
126 + StatusMessageSinc zMessageSinc = Instance.ofOptional( StatusMessageSinc.class );
126 127 if ( zMessageSinc != null ) {
127 128 zMessageSinc.setErrorMessage( mNextScreenProperties.ERROR.get() );
128 129 if ( Currently.isNullOrEmpty( mNextScreenProperties.ERROR.get() ) ) {
  @@ -131,9 +132,9 @@
131 132 }
132 133 mNextScreenProperties.clear();
133 134
134 - ScreenView zView = ((ScreenViewFactory) zFactory).createScreen( ClientContext.get(), zParams );
135 + ScreenView zView = ((ScreenViewFactory) zFactory).createScreen( zParams );
135 136 Widget zViewWidget = zView.augmentView( zView.getTopBar(), null );
136 - ClientContext.get().get( SingleWidgetPanel.class ).setWidget( zViewWidget ); // This line MUST BE last!
137 + Instance.of( SingleWidgetPanel.class ).setWidget( zViewWidget ); // This line MUST BE last!
137 138 }
138 139
139 140 @Override
  @@ -142,10 +143,10 @@
142 143 }
143 144
144 145 private void requestUserLogin( String pHistoryToken, String pError ) {
145 - LoginDialogViewFactory zFactory = ClientContext.get().get( LoginDialogViewFactory.class );
146 + LoginDialogViewFactory zFactory = Instance.of( LoginDialogViewFactory.class );
146 147 DialogView zView = zFactory.createDialog( false, new LoginSuccessCommand( pHistoryToken, mNextScreenProperties ) );
147 148 zView.setDialogErrorMessage( pError );
148 - ClientContext.get().get( SingleWidgetPanel.class ).setWidget( new SizeableSpacer().stretchable() );
149 + Instance.of( SingleWidgetPanel.class ).setWidget( new SizeableSpacer().stretchable() );
149 150 new DialogViewDialog( zView ).show();
150 151 }
151 152