|
@@ -3,8 +3,8 @@ |
3 |
3 |
|
|
4 |
4 |
|
import org.litesoft.GWT.client.*; |
5 |
5 |
|
import org.litesoft.GWT.client.command.*; |
|
6 |
+ |
import org.litesoft.GWT.client.widgets.Button; |
6 |
7 |
|
import org.litesoft.GWT.client.widgets.*; |
7 |
|
- |
import org.litesoft.GWT.client.widgets.SubmitButton; |
8 |
8 |
|
import org.litesoft.GWT.client.widgets.nonpublic.*; |
9 |
9 |
|
import org.litesoft.GWT.forms.client.*; |
10 |
10 |
|
import org.litesoft.GWT.forms.client.components.*; |
|
@@ -206,14 +206,15 @@ |
206 |
206 |
|
protected <T extends IViewObject<T>> ButtonBase createSubmitButton( VoDataProvider<T> pDataProvider, FormBinder<T> pFormBinder, ViewUpdatable<T> pViewUpdatable ) |
207 |
207 |
|
{ |
208 |
208 |
|
UtilsCommon.assertNotNull( "ViewUpdatable", pViewUpdatable ); |
209 |
|
- |
return new SubmitButton( createCommitClickHandler( pDataProvider, pFormBinder, null, pViewUpdatable ) ); |
|
209 |
+ |
return DefButtonNamed.submit().add( createCommitClickHandler( pDataProvider, pFormBinder, null, pViewUpdatable ) ).create(); |
210 |
210 |
|
} |
211 |
211 |
|
|
212 |
212 |
|
protected <T extends IViewObject<T>> ButtonBase createSubmitButton( VoDataProvider<T> pDataProvider, FormBinder<T> pFormBinder, ViewDef pNavigateToOnSuccess ) |
213 |
213 |
|
{ |
214 |
214 |
|
UtilsCommon.assertNotNull( "NavigateToOnSuccess", pNavigateToOnSuccess ); |
215 |
|
- |
return new GreenButton( "Save & Close", SubmitButton.SUBMIT_TOOL_TIP + " and then close", // |
216 |
|
- |
createCommitClickHandler( pDataProvider, pFormBinder, pNavigateToOnSuccess , null) ); |
|
215 |
+ |
return Button.named( "SaveClose" ).green().text( "Save & Close" ) // |
|
216 |
+ |
.enabledToolTip( DefButtonNamed.SUBMIT_TOOL_TIP + " and then close" ) // |
|
217 |
+ |
.add( createCommitClickHandler( pDataProvider, pFormBinder, pNavigateToOnSuccess, null ) ).create(); |
217 |
218 |
|
} |
218 |
219 |
|
|
219 |
220 |
|
protected <T extends IViewObject<T>> ButtonBase createSubmitNextButton( VoDataProvider<T> pDataProvider, FormBinder<T> pFormBinder, ViewDef pNavigateToOnSuccess ) |
|
@@ -222,8 +223,7 @@ |
222 |
223 |
|
createCommitClickHandler( pDataProvider, pFormBinder, pNavigateToOnSuccess, null ) ); |
223 |
224 |
|
} |
224 |
225 |
|
|
225 |
|
- |
private <T extends IViewObject<T>> ClickHandler createCommitClickHandler( final VoDataProvider<T> pDataProvider, final FormBinder<T> pFormBinder, |
226 |
|
- |
final ViewDef pNavigateToOnSuccess, final ViewUpdatable<T> pViewUpdatable ) |
|
226 |
+ |
private <T extends IViewObject<T>> ClickHandler createCommitClickHandler( final VoDataProvider<T> pDataProvider, final FormBinder<T> pFormBinder, final ViewDef pNavigateToOnSuccess, final ViewUpdatable<T> pViewUpdatable ) |
227 |
227 |
|
{ |
228 |
228 |
|
return new ClickHandler() |
229 |
229 |
|
{ |