Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/view/NewUserConfirmDialog.java

Diff revisions: vs.
  @@ -10,18 +10,16 @@
10 10
11 11 import com.google.gwt.user.client.ui.*;
12 12
13 - public class NewUserConfirmDialog<T extends SecurityUserView<T>> extends AbstractNewUserDialog<T>
14 - {
15 - public interface CallBack extends DialogCloseCallBack
16 - {
13 + public class NewUserConfirmDialog<T extends SecurityUserView<T>> extends AbstractNewUserDialog<T> {
14 + public interface CallBack extends DialogCloseCallBack {
17 15 public void succeeded();
18 16 }
19 17
20 18 private FormBinder<T> mFormBinder;
21 19 private CallBack mCallBack;
22 20
23 - public NewUserConfirmDialog( String pLogonEmail, String pPhoneNumber, T pUserView, CallBack pCallBack, QBEinputPanelAccessorFactory<T> pUserFieldsPanelFactory )
24 - {
21 + public NewUserConfirmDialog( String pLogonEmail, String pPhoneNumber, T pUserView, CallBack pCallBack,
22 + QBEinputPanelAccessorFactory<T> pUserFieldsPanelFactory ) {
25 23 super( title( "Confirm User" ), pLogonEmail, pPhoneNumber, pUserView, pUserFieldsPanelFactory );
26 24 Objects.assertNotNull( "CallBack", mCallBack = pCallBack );
27 25
  @@ -33,52 +31,44 @@
33 31 }
34 32
35 33 @Override
36 - public void aboutToShow()
37 - {
34 + public void aboutToShow() {
38 35 super.aboutToShow();
39 36 mFE.initialize();
40 37 }
41 38
42 39 @Override
43 - protected void justLoaded()
44 - {
40 + protected void justLoaded() {
45 41 super.justLoaded();
46 42 mFormBinder.setExistingObject( mUserView, FormEngine.Mode.ViewRegular );
47 43 mFE.setFocus();
48 44 }
49 45
50 46 @Override
51 - protected void submitRequested()
52 - {
47 + protected void submitRequested() {
53 48 T zView = mUserView.copyInto( mDataProvider.createTransactionSet() );
54 49 zView.setVisibleToCurrentRestrictedResource( Boolean.TRUE );
55 - mDataProvider.commit( zView, new CommitCallBack<T>()
56 - {
50 + mDataProvider.commit( zView, new CommitCallBack<T>() {
57 51 @Override
58 - public void success( ImmutableArrayList<T> pRows )
59 - {
52 + public void success( ImmutableArrayList<T> pRows ) {
60 53 close();
61 54 mCallBack.succeeded();
62 55 }
63 56
64 57 @Override
65 - public void error( String pError )
66 - {
58 + public void error( String pError ) {
67 59 setDialogErrorMessage( pError );
68 60 }
69 61 } );
70 62 }
71 63
72 64 @Override
73 - public void cancel()
74 - {
65 + public void cancel() {
75 66 super.cancel();
76 67 mCallBack.dialogClosed();
77 68 }
78 69
79 70 @Override
80 - public Widget getBottomBar()
81 - {
71 + public Widget getBottomBar() {
82 72 LeftCenterRightHorizontalPanel zActionPanel = new LeftCenterRightHorizontalPanel();
83 73 zActionPanel.addLeft( createCancelButton() );
84 74 zActionPanel.addRight( createSubmitButton() );