Subversion Repository Public Repository

litesoft

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

Diff revisions: vs.
  @@ -9,6 +9,7 @@
9 9 import org.litesoft.commonfoundation.base.*;
10 10 import org.litesoft.commonfoundation.typeutils.*;
11 11 import org.litesoft.core.*;
12 + import org.litesoft.commonfoundation.independence.*;
12 13 import org.litesoft.uispecification.*;
13 14
14 15 import com.google.gwt.event.dom.client.*;
  @@ -51,7 +52,7 @@
51 52 updateTitle();
52 53 }
53 54
54 - PageRefreshableProxy zRefreshableProxy = ClientContext.get().checkGet( PageRefreshableProxy.class );
55 + PageRefreshableProxy zRefreshableProxy = Instance.ofOptional( PageRefreshableProxy.class );
55 56 if ( zRefreshableProxy != null ) {
56 57 zRefreshableProxy.setProxyTo( this );
57 58 }
  @@ -140,7 +141,7 @@
140 141 }
141 142
142 143 protected Widget[] getQuickLinkRightButtons() {
143 - QuickLinkRightButtonsHandler zHandler = ClientContext.get().checkGet( QuickLinkRightButtonsHandler.class );
144 + QuickLinkRightButtonsHandler zHandler = Instance.ofOptional( QuickLinkRightButtonsHandler.class );
144 145 return (zHandler != null) ? zHandler.getQuickLinkRightButtons( this ) : null;
145 146 }
146 147
  @@ -188,7 +189,7 @@
188 189
189 190 protected void logoutButtonClicked() {
190 191 if ( UtilsGwt.wasCtrlKeyDownOnCurrentEvent() && Dev.isDevMode() && isHomeScreen() ) {
191 - NextDemoUserRequestHandler zHandler = ClientContext.get().get( NextDemoUserRequestHandler.class );
192 + NextDemoUserRequestHandler zHandler = Instance.of( NextDemoUserRequestHandler.class );
192 193 if ( zHandler != null ) {
193 194 zHandler.nextDemoUser();
194 195 return;
  @@ -202,7 +203,7 @@
202 203 }
203 204
204 205 protected void switchUserRequested() {
205 - new DialogViewDialog( ClientContext.get().get( LoginDialogViewFactory.class ).createDialog( true, createLoginOnSuccessCommand() ) ).show();
206 + new DialogViewDialog( Instance.of( LoginDialogViewFactory.class ).createDialog( true, createLoginOnSuccessCommand() ) ).show();
206 207 }
207 208
208 209 protected void logoutRequested() {
  @@ -211,13 +212,13 @@
211 212
212 213 @Override
213 214 public void logoutConfirmed() {
214 - ClientContext.get().get( SecurityUserViewDataProvider.class ).logoutUser();
215 + Instance.of( SecurityUserViewDataProvider.class ).logoutUser();
215 216 new ShowScreenCommand( ViewDef.HOME ).execute();
216 217 }
217 218
218 219 @Override
219 220 public void suspendRequested() {
220 - new DialogViewDialog( ClientContext.get().get( SuspendDialogViewFactory.class ).createDialog( this ) ).show();
221 + new DialogViewDialog( Instance.of( SuspendDialogViewFactory.class ).createDialog( this ) ).show();
221 222 }
222 223
223 224 private Command createLoginOnSuccessCommand() {
  @@ -268,7 +269,7 @@
268 269 }
269 270
270 271 protected abstract class BigButtonScreenHelper {
271 - protected ViewFactoryAccessor mViewFactoryAccessor = ClientContext.get().get( ViewFactoryAccessor.class );
272 + protected ViewFactoryAccessor mViewFactoryAccessor = Instance.of( ViewFactoryAccessor.class );
272 273
273 274 abstract public Widget build();
274 275