litesoft
Diff Revisions
947
vs
948
for /trunk/GWT_Sandbox/InitFrom/src/org/litesoft/initfrom/client/ui/views/admin/MyProfile.java
|
@@ -15,21 +15,18 @@ |
15 |
15 |
|
|
16 |
16 |
|
public class MyProfile extends ScreenView implements UserViewNames, |
17 |
17 |
|
ViewUpdatable<UserView>, |
18 |
|
- |
FetchRowDataProviderCallBack<UserView> |
19 |
|
- |
{ |
|
18 |
+ |
FetchRowDataProviderCallBack<UserView> { |
20 |
19 |
|
private FormEngine mFE; |
21 |
20 |
|
|
22 |
21 |
|
private UserViewDataProvider mDataProvider = UserViewDataProvider.getInstance(); |
23 |
22 |
|
private FormBinder<UserView> mFormBinder; |
24 |
23 |
|
|
25 |
24 |
|
@Override |
26 |
|
- |
protected UriFragmentIdParams createRefreshParams() |
27 |
|
- |
{ |
|
25 |
+ |
protected UriFragmentIdParams createRefreshParams() { |
28 |
26 |
|
return null; |
29 |
27 |
|
} |
30 |
28 |
|
|
31 |
|
- |
public MyProfile( String pSection, ViewDef pViewDef ) |
32 |
|
- |
{ |
|
29 |
+ |
public MyProfile( String pSection, ViewDef pViewDef ) { |
33 |
30 |
|
super( title( pSection, pViewDef ) ); |
34 |
31 |
|
|
35 |
32 |
|
addStandardTitleBar(); |
|
@@ -50,34 +47,31 @@ |
50 |
47 |
|
mFE = new FormEngine( zWidgetCtrlMap, FormEngine.Mode.EditRegular, null ); |
51 |
48 |
|
mFormBinder = new FormBinder<UserView>( mFE, UserViewMetaData.getInstance() ); |
52 |
49 |
|
|
53 |
|
- |
add( new QBEformConstrainingVerticalPanel( new UserFieldsPanel( ClientContext.get().get( CurrentRestrictedResourceViewAccessor.class ).getRestrictedResource(), true ), // |
54 |
|
- |
new SizeableSpacer().stretchable() ) ); |
|
50 |
+ |
add( new QBEformConstrainingVerticalPanel( |
|
51 |
+ |
new UserFieldsPanel( ClientContext.get().get( CurrentRestrictedResourceViewAccessor.class ).getRestrictedResource(), true ), // |
|
52 |
+ |
new SizeableSpacer().stretchable() ) ); |
55 |
53 |
|
add( new SizeableSpacer().stretchable() ); |
56 |
54 |
|
|
57 |
55 |
|
mDataProvider.requestRow( zUser.getObjectURL(), this ); |
58 |
56 |
|
} |
59 |
57 |
|
|
60 |
58 |
|
@Override |
61 |
|
- |
public void success( UserView pRow ) |
62 |
|
- |
{ |
|
59 |
+ |
public void success( UserView pRow ) { |
63 |
60 |
|
modeEdit( pRow ); |
64 |
61 |
|
} |
65 |
62 |
|
|
66 |
|
- |
private void modeEdit( UserView pUser ) |
67 |
|
- |
{ |
|
63 |
+ |
private void modeEdit( UserView pUser ) { |
68 |
64 |
|
mFormBinder.setExistingObject( mDataProvider.copyIntoNewTS( pUser ), FormEngine.Mode.EditRegular ); |
69 |
65 |
|
} |
70 |
66 |
|
|
71 |
67 |
|
@Override |
72 |
|
- |
public void aboutToShow() |
73 |
|
- |
{ |
|
68 |
+ |
public void aboutToShow() { |
74 |
69 |
|
super.aboutToShow(); |
75 |
70 |
|
mFE.initialize(); |
76 |
71 |
|
} |
77 |
72 |
|
|
78 |
73 |
|
@Override |
79 |
|
- |
public Widget getBottomBar() |
80 |
|
- |
{ |
|
74 |
+ |
public Widget getBottomBar() { |
81 |
75 |
|
LeftCenterRightHorizontalPanel zActionPanel = new LeftCenterRightHorizontalPanel(); |
82 |
76 |
|
|
83 |
77 |
|
zActionPanel.addLeft( mFE.addEditRevertButton( createRevertButton() ) ); |
|
@@ -88,8 +82,7 @@ |
88 |
82 |
|
} |
89 |
83 |
|
|
90 |
84 |
|
@Override |
91 |
|
- |
public void viewUpdated( UserView pUserView ) |
92 |
|
- |
{ |
|
85 |
+ |
public void viewUpdated( UserView pUserView ) { |
93 |
86 |
|
modeEdit( pUserView ); |
94 |
87 |
|
} |
95 |
88 |
|
} |