Subversion Repository Public Repository

litesoft

Diff Revisions 954 vs 955 for /trunk/GWT_Sandbox/InitFrom/src/org/litesoft/initfrom/client/boviews/InitFrom_TypedVoDataProvider.java

Diff revisions: vs.
  @@ -3,6 +3,7 @@
3 3 import org.litesoft.bo.views.*;
4 4 import org.litesoft.commonfoundation.base.*;
5 5 import org.litesoft.core.*;
6 + import org.litesoft.commonfoundation.independence.*;
6 7 import org.litesoft.core.util.*;
7 8
8 9 import java.util.*;
  @@ -57,7 +58,7 @@
57 58 }
58 59
59 60 public static UserView getCurrentUser() {
60 - CurrentUserViewAccessor zAccessor = ClientContext.get().checkGet( CurrentUserViewAccessor.class );
61 + CurrentUserViewAccessor zAccessor = Instance.ofOptional( CurrentUserViewAccessor.class );
61 62 return zAccessor != null ? zAccessor.getUser() : null;
62 63 }
63 64
  @@ -73,12 +74,12 @@
73 74 }
74 75
75 76 public static boolean checkForCurrentUser( UserView pUser ) {
76 - CurrentUserViewAccessor zAccessor = ClientContext.get().checkGet( CurrentUserViewAccessor.class );
77 + CurrentUserViewAccessor zAccessor = Instance.ofOptional( CurrentUserViewAccessor.class );
77 78 return (zAccessor != null) && Currently.areEqual( pUser, zAccessor.getUser() );
78 79 }
79 80
80 81 public static void updateContext( UserView pUserView ) {
81 - CurrentUserViewAccessor zAccessor = ClientContext.get().checkGet( CurrentUserViewAccessor.class );
82 + CurrentUserViewAccessor zAccessor = Instance.ofOptional( CurrentUserViewAccessor.class );
82 83 if ( zAccessor != null ) {
83 84 zAccessor.setUser( pUserView );
84 85 }
  @@ -86,7 +87,7 @@
86 87 RestrictedResourceView zRestrictedResourceView = pUserView.getCurrentRestrictedResource(); // !null on Login!
87 88 if ( zRestrictedResourceView != null ) {
88 89 updateContext( zRestrictedResourceView );
89 - CurrentRestrictedResourceOptionsAccessor zOptionsAccessor = ClientContext.get().checkGet( CurrentRestrictedResourceOptionsAccessor.class );
90 + CurrentRestrictedResourceOptionsAccessor zOptionsAccessor = Instance.ofOptional( CurrentRestrictedResourceOptionsAccessor.class );
90 91 if ( zOptionsAccessor != null ) {
91 92 zOptionsAccessor.setRestrictedResourceOptions( pUserView.getAlternateRestrictedResourceOptions() );
92 93 }
  @@ -95,7 +96,7 @@
95 96 }
96 97
97 98 public static RestrictedResourceView checkForCurrentRestrictedResourceInTransaction( TransactionSet pTransactionSet ) {
98 - CurrentRestrictedResourceViewAccessor zAccessor = ClientContext.get().checkGet( CurrentRestrictedResourceViewAccessor.class );
99 + CurrentRestrictedResourceViewAccessor zAccessor = Instance.ofOptional( CurrentRestrictedResourceViewAccessor.class );
99 100 if ( zAccessor != null ) {
100 101 RestrictedResourceView zCurrentRestrictedResource = zAccessor.getRestrictedResource();
101 102 if ( zCurrentRestrictedResource != null ) {
  @@ -109,12 +110,12 @@
109 110 }
110 111
111 112 public static boolean checkForCurrentRestrictedResource( RestrictedResourceView pRestrictedResource ) {
112 - CurrentRestrictedResourceViewAccessor zAccessor = ClientContext.get().checkGet( CurrentRestrictedResourceViewAccessor.class );
113 + CurrentRestrictedResourceViewAccessor zAccessor = Instance.ofOptional( CurrentRestrictedResourceViewAccessor.class );
113 114 return (zAccessor != null) && Currently.areEqual( pRestrictedResource, zAccessor.getRestrictedResource() );
114 115 }
115 116
116 117 public static void updateContext( RestrictedResourceView pRestrictedResourceView ) {
117 - CurrentRestrictedResourceViewAccessor zAccessor = ClientContext.get().checkGet( CurrentRestrictedResourceViewAccessor.class );
118 + CurrentRestrictedResourceViewAccessor zAccessor = Instance.ofOptional( CurrentRestrictedResourceViewAccessor.class );
118 119 if ( zAccessor != null ) {
119 120 zAccessor.setRestrictedResource( pRestrictedResourceView );
120 121 }