|
@@ -1,16 +1,9 @@ |
1 |
1 |
|
package org.litesoft.GWT.client.view; |
2 |
2 |
|
|
3 |
|
- |
import org.litesoft.GWT.client.*; |
4 |
|
- |
import org.litesoft.GWT.client.widgets.*; |
5 |
|
- |
import org.litesoft.GWT.forms.client.*; |
6 |
|
- |
import org.litesoft.GWT.forms.client.components.*; |
7 |
3 |
|
import org.litesoft.security.*; |
8 |
4 |
|
|
9 |
5 |
|
import com.google.gwt.core.client.*; |
10 |
6 |
|
import com.google.gwt.user.client.*; |
11 |
|
- |
import com.google.gwt.user.client.ui.*; |
12 |
|
- |
|
13 |
|
- |
import static org.litesoft.uispecification.FormWidgetCtrl.*; |
14 |
7 |
|
|
15 |
8 |
|
public abstract class AbstractNewUserDialog<T extends SecurityUserView<T>> extends AbstractSecurityDialogView<T> { |
16 |
9 |
|
protected String mLogonEmail; |
|
@@ -19,48 +12,21 @@ |
19 |
12 |
|
protected QBEinputPanelAccessorFactory<T> mUserFieldsPanelFactory; |
20 |
13 |
|
|
21 |
14 |
|
public AbstractNewUserDialog( CO pCO, String pLogonEmail, String pPhoneNumber, T pUserView, QBEinputPanelAccessorFactory<T> pUserFieldsPanelFactory ) { |
22 |
|
- |
super( pCO, Opaqueness.Semi ); |
|
15 |
+ |
super( pCO, Opaqueness.Semi, true ); |
23 |
16 |
|
mLogonEmail = pLogonEmail; |
24 |
17 |
|
mPhoneNumber = pPhoneNumber; |
25 |
18 |
|
mUserView = pUserView; |
26 |
19 |
|
mUserFieldsPanelFactory = pUserFieldsPanelFactory; |
27 |
|
- |
|
28 |
|
- |
createFormEngine(); |
29 |
20 |
|
} |
30 |
21 |
|
|
31 |
|
- |
private void createFormEngine() { |
32 |
|
- |
mFE = new FormEngine( new WidgetCtrlMap( VISIBLE_AND_ACTIVE_ENABLED ), FormEngine.Mode.EditRegular, null ) { |
33 |
|
- |
@Override |
34 |
|
- |
protected void enterPressedOn( String pName, IFormComponent pComponent, KeyboardKeyModifier pModifiers ) { |
35 |
|
- |
super.enterPressedOn( pName, pComponent, pModifiers ); // Only one field. Don't care what it is. |
36 |
|
- |
|
37 |
|
- |
Scheduler.get().scheduleDeferred( new Command() { |
38 |
|
- |
@Override |
39 |
|
- |
public void execute() { |
40 |
|
- |
submitRequested(); |
41 |
|
- |
} |
42 |
|
- |
} ); |
43 |
|
- |
} |
44 |
|
- |
|
|
22 |
+ |
@Override |
|
23 |
+ |
protected boolean processEnterPressedOn( String pName ) { |
|
24 |
+ |
Scheduler.get().scheduleDeferred( new Command() { |
45 |
25 |
|
@Override |
46 |
|
- |
protected void changeOccurredOn( String pName, IFormComponent pComponent, boolean pChanged ) { |
47 |
|
- |
super.changeOccurredOn( pName, pComponent, pChanged ); // Only one field, Don't care what it is. |
48 |
|
- |
setDialogErrorMessage( "" ); |
|
26 |
+ |
public void execute() { |
|
27 |
+ |
submitRequested(); |
49 |
28 |
|
} |
50 |
|
- |
}; |
51 |
|
- |
} |
52 |
|
- |
|
53 |
|
- |
@Override |
54 |
|
- |
protected void justLoaded() { |
55 |
|
- |
super.justLoaded(); |
56 |
|
- |
mFE.setFocus(); |
57 |
|
- |
} |
58 |
|
- |
|
59 |
|
- |
@Override |
60 |
|
- |
public Widget getBottomBar() { |
61 |
|
- |
LeftCenterRightHorizontalPanel zActionPanel = new LeftCenterRightHorizontalPanel(); |
62 |
|
- |
zActionPanel.addLeft( createCancelButton() ); |
63 |
|
- |
zActionPanel.addRight( mFE.addEditSubmitButton( createSubmitButton() ) ); |
64 |
|
- |
return zActionPanel; |
|
29 |
+ |
} ); |
|
30 |
+ |
return true; // Only one field. Don't care what it is. |
65 |
31 |
|
} |
66 |
32 |
|
} |