litesoft
Diff Revisions
495
vs
496
for /trunk/Java/DATT/src/org/litesoft/datt/client/ui/views/home/Home.java
|
@@ -4,62 +4,34 @@ |
4 |
4 |
|
|
5 |
5 |
|
import org.litesoft.GWT.client.*; |
6 |
6 |
|
import org.litesoft.GWT.client.command.*; |
7 |
|
- |
import org.litesoft.GWT.client.dev.*; |
8 |
7 |
|
import org.litesoft.GWT.client.view.*; |
9 |
8 |
|
import org.litesoft.GWT.client.widgets.*; |
10 |
9 |
|
import org.litesoft.bo.views.*; |
11 |
10 |
|
import org.litesoft.core.*; |
12 |
11 |
|
import org.litesoft.core.simpletypes.*; |
13 |
12 |
|
import org.litesoft.datt.client.*; |
|
13 |
+ |
import org.litesoft.datt.client.accessors.*; |
14 |
14 |
|
import org.litesoft.datt.client.boviews.*; |
15 |
|
- |
import org.litesoft.datt.client.ui.views.*; |
|
15 |
+ |
import org.litesoft.datt.client.support.*; |
16 |
16 |
|
import org.litesoft.uispecification.*; |
17 |
17 |
|
|
18 |
18 |
|
import com.google.gwt.event.dom.client.*; |
19 |
19 |
|
import com.google.gwt.user.client.ui.*; |
20 |
20 |
|
|
21 |
|
- |
public class Home extends DATTscreenView implements ViewDefs |
|
21 |
+ |
public class Home extends ScreenView implements ViewDefs |
22 |
22 |
|
{ |
23 |
|
- |
@Override |
24 |
|
- |
protected UriFragmentIdParams createRefreshParams() |
25 |
|
- |
{ |
26 |
|
- |
return null; |
27 |
|
- |
} |
|
23 |
+ |
public static final String TITLE = "Distributed Agile Task Tracker"; |
28 |
24 |
|
|
29 |
25 |
|
@Override |
30 |
|
- |
public Widget getBottomBar() |
|
26 |
+ |
protected UriFragmentIdParams createRefreshParams() |
31 |
27 |
|
{ |
32 |
28 |
|
return null; |
33 |
29 |
|
} |
34 |
30 |
|
|
35 |
|
- |
@Override |
36 |
|
- |
protected void logoutButtonClicked() |
37 |
|
- |
{ |
38 |
|
- |
if ( UtilsGwt.wasCtrlKeyDownOnCurrentEvent() && Dev.isDevMode() ) |
39 |
|
- |
{ |
40 |
|
- |
ClientContext.get().get( NextDemoUserRequestHandler.class ).nextDemoUser(); |
41 |
|
- |
return; |
42 |
|
- |
} |
43 |
|
- |
super.logoutButtonClicked(); |
44 |
|
- |
} |
45 |
|
- |
|
46 |
31 |
|
public Home() |
47 |
32 |
|
{ |
48 |
|
- |
styleTitleBar( "HomeTitleBar" ); |
49 |
|
- |
|
50 |
|
- |
SimplePanel zLogoWrapper = new SimplePanel(); |
51 |
|
- |
zLogoWrapper.addStyleName( "LogoWrapper" ); |
52 |
|
- |
|
53 |
|
- |
OurImage zImage = new OurImage( "common/images/DATTLogo.gif" ); |
54 |
|
- |
zImage.addStyleName( "DATTLogo" ); |
55 |
|
- |
|
56 |
|
- |
zLogoWrapper.add( zImage ); |
57 |
|
- |
|
58 |
|
- |
addLeft( zLogoWrapper ); |
59 |
|
- |
|
60 |
|
- |
setRightValign( HasVerticalAlignment.ALIGN_TOP ); |
61 |
|
- |
|
62 |
|
- |
addLogout(); |
|
33 |
+ |
super( title( TITLE ) ); |
|
34 |
+ |
addStandardTitleBar(); |
63 |
35 |
|
|
64 |
36 |
|
add( new BigButtonScreenHelper() |
65 |
37 |
|
{ |
|
@@ -68,7 +40,7 @@ |
68 |
40 |
|
{ |
69 |
41 |
|
UserView zUser = ClientContext.get().get( CurrentUserViewAccessor.class ).getUser(); |
70 |
42 |
|
List<Widget> zSections = new ArrayList<Widget>(); |
71 |
|
- |
Role zLastRole = Role.valueFor( zUser.getLastRestrictedResourceRole() ); |
|
43 |
+ |
Role zLastRole = UtilsGwt.deNull( Role.valueFor( zUser.getLastRestrictedResourceRole() ), Role.EndUser ); |
72 |
44 |
|
switch ( zLastRole ) |
73 |
45 |
|
{ |
74 |
46 |
|
default: |