|
@@ -1,53 +1,53 @@ |
1 |
|
- |
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
|
- |
package org.litesoft.GWT.forms.client; |
3 |
|
- |
|
4 |
|
- |
import java.io.*; |
5 |
|
- |
|
6 |
|
- |
public interface UiFormListener { |
7 |
|
- |
/** |
8 |
|
- |
* Called when the form has fields and is added to the target container. You |
9 |
|
- |
* will typically call {@link UiFormHandler#requestValues(String)} to ensure |
10 |
|
- |
* the back end has started a transaction. |
11 |
|
- |
*/ |
12 |
|
- |
public void formRendered( UiFormHandler pUiFormHandler, Serializable pServicePeerXtra ); |
13 |
|
- |
|
14 |
|
- |
/** |
15 |
|
- |
* Called after the form is fully populated with values from the back end. |
16 |
|
- |
*/ |
17 |
|
- |
public void formValuesApplied( UiFormHandler pUiFormHandler, Serializable pServicePeerXtra ); |
18 |
|
- |
|
19 |
|
- |
/** |
20 |
|
- |
* Called when the form ErrorState changes. |
21 |
|
- |
* |
22 |
|
- |
* @param pFormHasErrors <code>true</code> if the form currently has errors |
23 |
|
- |
*/ |
24 |
|
- |
public void formErrorState( UiFormHandler pUiFormHandler, boolean pFormHasErrors ); |
25 |
|
- |
|
26 |
|
- |
/** |
27 |
|
- |
* Called when the form is modified (dirty) or set to a clean state. |
28 |
|
- |
* |
29 |
|
- |
* @param pFormHasChanges <code>true</code> if the committing the form |
30 |
|
- |
* will result in a change on the back end |
31 |
|
- |
*/ |
32 |
|
- |
public void formChangeState( UiFormHandler pUiFormHandler, boolean pFormHasChanges ); |
33 |
|
- |
|
34 |
|
- |
/** |
35 |
|
- |
* Called when an action (i.e. button) on the form has been requested |
36 |
|
- |
* (clicked). Allows you to veto the action to prevent it from being |
37 |
|
- |
* executed on the back end. |
38 |
|
- |
* |
39 |
|
- |
* @return <code>true</code> to veto the Action |
40 |
|
- |
*/ |
41 |
|
- |
public boolean formActionRequested( UiFormHandler pUiFormHandler, String pActionID ); |
42 |
|
- |
|
43 |
|
- |
/** |
44 |
|
- |
* Called by the form service to indicate the Service Peer Successfully processed an ActionRequest. |
45 |
|
- |
*/ |
46 |
|
- |
public void formActionSucceeded( UiFormHandler pUiFormHandler, String pActionID, // todo: boolean pDataCommitted, |
47 |
|
- |
Serializable pServicePeerXtra ); |
48 |
|
- |
|
49 |
|
- |
/** |
50 |
|
- |
* Called by the form service to indicate the form UI should be disposed. |
51 |
|
- |
*/ |
52 |
|
- |
public void formCloseRequested( UiFormHandler pUiFormHandler, Serializable pServicePeerXtra ); |
53 |
|
- |
} |
|
1 |
+ |
// This Source Code is in the Public Domain per: http://unlicense.org |
|
2 |
+ |
package org.litesoft.GWT.forms.client; |
|
3 |
+ |
|
|
4 |
+ |
import java.io.*; |
|
5 |
+ |
|
|
6 |
+ |
public interface UiFormListener { |
|
7 |
+ |
/** |
|
8 |
+ |
* Called when the form has fields and is added to the target container. You |
|
9 |
+ |
* will typically call {@link UiFormHandler#requestValues(String)} to ensure |
|
10 |
+ |
* the back end has started a transaction. |
|
11 |
+ |
*/ |
|
12 |
+ |
public void formRendered( UiFormHandler pUiFormHandler, Serializable pServicePeerXtra ); |
|
13 |
+ |
|
|
14 |
+ |
/** |
|
15 |
+ |
* Called after the form is fully populated with values from the back end. |
|
16 |
+ |
*/ |
|
17 |
+ |
public void formValuesApplied( UiFormHandler pUiFormHandler, Serializable pServicePeerXtra ); |
|
18 |
+ |
|
|
19 |
+ |
/** |
|
20 |
+ |
* Called when the form ErrorState changes. |
|
21 |
+ |
* |
|
22 |
+ |
* @param pFormHasErrors <code>true</code> if the form currently has errors |
|
23 |
+ |
*/ |
|
24 |
+ |
public void formErrorState( UiFormHandler pUiFormHandler, boolean pFormHasErrors ); |
|
25 |
+ |
|
|
26 |
+ |
/** |
|
27 |
+ |
* Called when the form is modified (dirty) or set to a clean state. |
|
28 |
+ |
* |
|
29 |
+ |
* @param pFormHasChanges <code>true</code> if the committing the form |
|
30 |
+ |
* will result in a change on the back end |
|
31 |
+ |
*/ |
|
32 |
+ |
public void formChangeState( UiFormHandler pUiFormHandler, boolean pFormHasChanges ); |
|
33 |
+ |
|
|
34 |
+ |
/** |
|
35 |
+ |
* Called when an action (i.e. button) on the form has been requested |
|
36 |
+ |
* (clicked). Allows you to veto the action to prevent it from being |
|
37 |
+ |
* executed on the back end. |
|
38 |
+ |
* |
|
39 |
+ |
* @return <code>true</code> to veto the Action |
|
40 |
+ |
*/ |
|
41 |
+ |
public boolean formActionRequested( UiFormHandler pUiFormHandler, String pActionID ); |
|
42 |
+ |
|
|
43 |
+ |
/** |
|
44 |
+ |
* Called by the form service to indicate the Service Peer Successfully processed an ActionRequest. |
|
45 |
+ |
*/ |
|
46 |
+ |
public void formActionSucceeded( UiFormHandler pUiFormHandler, String pActionID, // todo: boolean pDataCommitted, |
|
47 |
+ |
Serializable pServicePeerXtra ); |
|
48 |
+ |
|
|
49 |
+ |
/** |
|
50 |
+ |
* Called by the form service to indicate the form UI should be disposed. |
|
51 |
+ |
*/ |
|
52 |
+ |
public void formCloseRequested( UiFormHandler pUiFormHandler, Serializable pServicePeerXtra ); |
|
53 |
+ |
} |