|
@@ -1,7 +1,5 @@ |
1 |
1 |
|
package org.litesoft.GWT.client.view; |
2 |
2 |
|
|
3 |
|
- |
import java.util.*; |
4 |
|
- |
|
5 |
3 |
|
import org.litesoft.GWT.client.command.*; |
6 |
4 |
|
import org.litesoft.GWT.client.widgets.*; |
7 |
5 |
|
import org.litesoft.GWT.forms.client.*; |
|
@@ -11,10 +9,11 @@ |
11 |
9 |
|
|
12 |
10 |
|
import com.google.gwt.user.client.ui.*; |
13 |
11 |
|
|
|
12 |
+ |
import java.util.*; |
|
13 |
+ |
|
14 |
14 |
|
import static org.litesoft.uispecification.FormWidgetCtrl.*; |
15 |
15 |
|
|
16 |
|
- |
public abstract class TwoViewObjectInfoHelper<T extends IViewObject<T>> |
17 |
|
- |
{ |
|
16 |
+ |
public abstract class TwoViewObjectInfoHelper<T extends IViewObject<T>> { |
18 |
17 |
|
private final TwoViewObjectInfoHelperScreenView mScreenView; |
19 |
18 |
|
private final ViewDef mViewDef; |
20 |
19 |
|
private final FormEngine mFE; |
|
@@ -23,57 +22,47 @@ |
23 |
22 |
|
private boolean mHasViewObject = false; |
24 |
23 |
|
private FormBinder<T> mFormBinder; |
25 |
24 |
|
|
26 |
|
- |
protected TwoViewObjectInfoHelper( TwoViewObjectInfoHelperScreenView pScreenView, ViewDef pViewDef, WidgetCtrlMap pWidgetCtrlMap ) |
27 |
|
- |
{ |
|
25 |
+ |
protected TwoViewObjectInfoHelper( TwoViewObjectInfoHelperScreenView pScreenView, ViewDef pViewDef, WidgetCtrlMap pWidgetCtrlMap ) { |
28 |
26 |
|
mScreenView = pScreenView; |
29 |
27 |
|
mViewDef = pViewDef; |
30 |
28 |
|
mFE = new FormEngine( pWidgetCtrlMap, FormEngine.Mode.ViewRegular, null ); |
31 |
29 |
|
} |
32 |
30 |
|
|
33 |
|
- |
protected TwoViewObjectInfoHelper( TwoViewObjectInfoHelperScreenView pScreenView, ViewDef pViewDef ) |
34 |
|
- |
{ |
|
31 |
+ |
protected TwoViewObjectInfoHelper( TwoViewObjectInfoHelperScreenView pScreenView, ViewDef pViewDef ) { |
35 |
32 |
|
this( pScreenView, pViewDef, new WidgetCtrlMap( VISIBLE_BUT_DISABLED ) ); |
36 |
33 |
|
} |
37 |
34 |
|
|
38 |
|
- |
public void initialize( ObjectURL pViewObjectURL, TwoViewObjectInfoHelper pOtherHelper ) |
39 |
|
- |
{ |
|
35 |
+ |
public void initialize( ObjectURL pViewObjectURL, TwoViewObjectInfoHelper pOtherHelper ) { |
40 |
36 |
|
mViewObjectURL = pViewObjectURL; |
41 |
37 |
|
mOtherHelper = pOtherHelper; |
42 |
38 |
|
mFormBinder = createFormBinder( mFE ); |
43 |
39 |
|
} |
44 |
40 |
|
|
45 |
|
- |
public FormBinder<T> getFormBinder() |
46 |
|
- |
{ |
|
41 |
+ |
public FormBinder<T> getFormBinder() { |
47 |
42 |
|
return mFormBinder; |
48 |
43 |
|
} |
49 |
44 |
|
|
50 |
|
- |
public ObjectURL getViewObjectURL() |
51 |
|
- |
{ |
|
45 |
+ |
public ObjectURL getViewObjectURL() { |
52 |
46 |
|
return mViewObjectURL; |
53 |
47 |
|
} |
54 |
48 |
|
|
55 |
|
- |
public StatusMessageSinc getStatusMessageSinc() |
56 |
|
- |
{ |
|
49 |
+ |
public StatusMessageSinc getStatusMessageSinc() { |
57 |
50 |
|
return mScreenView.getStatusMessageSinc(); |
58 |
51 |
|
} |
59 |
52 |
|
|
60 |
|
- |
public void backToHome( String pError ) |
61 |
|
- |
{ |
|
53 |
+ |
public void backToHome( String pError ) { |
62 |
54 |
|
mScreenView.backToHome( pError ); |
63 |
55 |
|
} |
64 |
56 |
|
|
65 |
|
- |
public Set<String> getNamedComponentNames() |
66 |
|
- |
{ |
|
57 |
+ |
public Set<String> getNamedComponentNames() { |
67 |
58 |
|
return mFE.getNamedComponentNames(); |
68 |
59 |
|
} |
69 |
60 |
|
|
70 |
|
- |
public IFormComponent getNamedComponent( String pName ) |
71 |
|
- |
{ |
|
61 |
+ |
public IFormComponent getNamedComponent( String pName ) { |
72 |
62 |
|
return mFE.getNamedComponent( pName ); |
73 |
63 |
|
} |
74 |
64 |
|
|
75 |
|
- |
public ShowScreenCommand createShowScreenCommand() |
76 |
|
- |
{ |
|
65 |
+ |
public ShowScreenCommand createShowScreenCommand() { |
77 |
66 |
|
return new ShowScreenCommand( mViewDef, mScreenView.createRefreshParams() ); |
78 |
67 |
|
} |
79 |
68 |
|
|
|
@@ -83,12 +72,10 @@ |
83 |
72 |
|
|
84 |
73 |
|
abstract public boolean requestViewObject(); |
85 |
74 |
|
|
86 |
|
- |
protected void setExistingObject( T pViewObject, FormEngine.Mode pMode ) |
87 |
|
- |
{ |
|
75 |
+ |
protected void setExistingObject( T pViewObject, FormEngine.Mode pMode ) { |
88 |
76 |
|
mHasViewObject = true; |
89 |
77 |
|
mFormBinder.setExistingObject( pViewObject, pMode ); |
90 |
|
- |
if ( mOtherHelper.mHasViewObject ) |
91 |
|
- |
{ |
|
78 |
+ |
if ( mOtherHelper.mHasViewObject ) { |
92 |
79 |
|
mScreenView.formsReady(); |
93 |
80 |
|
} |
94 |
81 |
|
} |