|
@@ -1,8 +1,6 @@ |
1 |
1 |
|
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
2 |
|
package org.litesoft.GWT.client.view; |
3 |
3 |
|
|
4 |
|
- |
import java.util.*; |
5 |
|
- |
|
6 |
4 |
|
import org.litesoft.GWT.client.*; |
7 |
5 |
|
import org.litesoft.GWT.client.widgets.*; |
8 |
6 |
|
import org.litesoft.GWT.forms.client.*; |
|
@@ -11,58 +9,51 @@ |
11 |
9 |
|
|
12 |
10 |
|
import com.google.gwt.user.client.ui.*; |
13 |
11 |
|
|
14 |
|
- |
public abstract class ReportDialogView extends DialogView |
15 |
|
- |
{ |
|
12 |
+ |
import java.util.*; |
|
13 |
+ |
|
|
14 |
+ |
public abstract class ReportDialogView extends DialogView { |
16 |
15 |
|
protected String mReportID; |
17 |
16 |
|
protected FormEngine mFE; |
18 |
17 |
|
|
19 |
|
- |
protected ReportDialogView( ViewDef pViewDef ) |
20 |
|
- |
{ |
|
18 |
+ |
protected ReportDialogView( ViewDef pViewDef ) { |
21 |
19 |
|
super( title( pViewDef ), Opaqueness.Semi ); |
22 |
20 |
|
mReportID = pViewDef.getFragmentID(); |
23 |
21 |
|
} |
24 |
22 |
|
|
25 |
|
- |
protected ReportDialogView( String pSection, ViewDef pViewDef ) |
26 |
|
- |
{ |
|
23 |
+ |
protected ReportDialogView( String pSection, ViewDef pViewDef ) { |
27 |
24 |
|
super( title( pSection, pViewDef ), Opaqueness.Semi ); |
28 |
25 |
|
mReportID = pViewDef.getFragmentID(); |
29 |
26 |
|
} |
30 |
27 |
|
|
31 |
28 |
|
public void setNamedComponentError( String pName, String pError ) |
32 |
|
- |
throws NoSuchElementException |
33 |
|
- |
{ |
|
29 |
+ |
throws NoSuchElementException { |
34 |
30 |
|
setDialogErrorMessage( pError ); |
35 |
31 |
|
mFE.setNamedComponentError( pName, pError ); |
36 |
32 |
|
} |
37 |
33 |
|
|
38 |
34 |
|
@Override |
39 |
|
- |
public void aboutToShow() |
40 |
|
- |
{ |
|
35 |
+ |
public void aboutToShow() { |
41 |
36 |
|
super.aboutToShow(); |
42 |
37 |
|
mFE.initialize(); |
43 |
38 |
|
} |
44 |
39 |
|
|
45 |
40 |
|
@Override |
46 |
|
- |
protected void justLoaded() |
47 |
|
- |
{ |
|
41 |
+ |
protected void justLoaded() { |
48 |
42 |
|
super.justLoaded(); |
49 |
43 |
|
setDefaultValues(); |
50 |
44 |
|
setDialogErrorMessage( null ); |
51 |
45 |
|
mFE.setFocus(); |
52 |
46 |
|
} |
53 |
47 |
|
|
54 |
|
- |
protected void setDefaultValues() |
55 |
|
- |
{ |
|
48 |
+ |
protected void setDefaultValues() { |
56 |
49 |
|
} |
57 |
50 |
|
|
58 |
51 |
|
@Override |
59 |
|
- |
public Widget getBottomBar() |
60 |
|
- |
{ |
|
52 |
+ |
public Widget getBottomBar() { |
61 |
53 |
|
return createButtomBar(); |
62 |
54 |
|
} |
63 |
55 |
|
|
64 |
|
- |
protected LeftCenterRightHorizontalPanel createButtomBar() |
65 |
|
- |
{ |
|
56 |
+ |
protected LeftCenterRightHorizontalPanel createButtomBar() { |
66 |
57 |
|
LeftCenterRightHorizontalPanel zActionPanel = new LeftCenterRightHorizontalPanel(); |
67 |
58 |
|
zActionPanel.addLeft( createCancelButton() ); |
68 |
59 |
|
zActionPanel.addRight( mFE.addEditSubmitButton( createSubmitButton() ) ); |
|
@@ -70,11 +61,9 @@ |
70 |
61 |
|
} |
71 |
62 |
|
|
72 |
63 |
|
@Override |
73 |
|
- |
protected void submitRequested() |
74 |
|
- |
{ |
|
64 |
+ |
protected void submitRequested() { |
75 |
65 |
|
UriFragmentIdParams zParams = createSubmitParams(); |
76 |
|
- |
if ( zParams != null ) |
77 |
|
- |
{ |
|
66 |
+ |
if ( zParams != null ) { |
78 |
67 |
|
String zWhen = new SimpleTimestamp( TimeRes.ToMIN, new Date() ).toString().replace( ' ', '-' ).replace( ':', '-' ); |
79 |
68 |
|
UtilsGwt.windowOpen( "Report/" + zParams.toParamsString() + "/" + mReportID + "-" + zWhen + ".html", mReportID, "" ); |
80 |
69 |
|
close(); |