summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxwu2013-05-23 03:18:02 (EDT)
committermwu2013-05-23 03:18:02 (EDT)
commita8720e4da67f8c214820ba43fc78276cc2dd6fd2 (patch)
treef2cc5f1d95777f7f48f7834aa99edb13025f6d8a
parentef15285e397a392387528b23c2104bd979ba687f (diff)
downloadorg.eclipse.datatools.enablement.oda-a8720e4da67f8c214820ba43fc78276cc2dd6fd2.zip
org.eclipse.datatools.enablement.oda-a8720e4da67f8c214820ba43fc78276cc2dd6fd2.tar.gz
org.eclipse.datatools.enablement.oda-a8720e4da67f8c214820ba43fc78276cc2dd6fd2.tar.bz2
Fix bugzilla bug [408780] - "default value" is not saved in web servicev201305231518
data set if click "BACK" and "NEXT".
-rw-r--r--plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPParametersPage.java45
1 files changed, 33 insertions, 12 deletions
diff --git a/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPParametersPage.java b/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPParametersPage.java
index 2396805..dedd21f 100644
--- a/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPParametersPage.java
+++ b/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPParametersPage.java
@@ -64,6 +64,8 @@ public class SOAPParametersPage extends DataSetWizardPage
private CheckboxTableViewer viewer;
private SOAPRequest soapRequest;
private String wsQueryText;
+
+ private boolean modelChanged;
private static String DEFAULT_MESSAGE = Messages.getString( "soapParametersPage.message.default" );//$NON-NLS-1$
@@ -104,6 +106,9 @@ public class SOAPParametersPage extends DataSetWizardPage
setupParametersComposite( composite );
setupSelectionButtons( composite );
+
+ modelChanged = true;
+
return composite;
}
@@ -135,8 +140,12 @@ public class SOAPParametersPage extends DataSetWizardPage
public void widgetSelected( SelectionEvent e )
{
- viewer.setAllChecked( true );
- saveToModel( );
+ if( viewer.getCheckedElements( ).length < viewer.getTable( ).getItemCount( ) )
+ {
+ viewer.setAllChecked( true );
+ saveToModel( );
+ modelChanged = true;
+ }
}
} );
@@ -147,8 +156,12 @@ public class SOAPParametersPage extends DataSetWizardPage
public void widgetSelected( SelectionEvent e )
{
- viewer.setAllChecked( false );
- saveToModel( );
+ if ( viewer.getCheckedElements( ).length > 0 )
+ {
+ viewer.setAllChecked( false );
+ saveToModel( );
+ modelChanged = true;
+ }
}
} );
@@ -190,6 +203,7 @@ public class SOAPParametersPage extends DataSetWizardPage
public void widgetSelected( SelectionEvent e )
{
sortParametersTable( );
+ modelChanged = true;
}
} );
@@ -279,6 +293,7 @@ public class SOAPParametersPage extends DataSetWizardPage
viewer.refresh( );
saveToModel( );
}
+ modelChanged = true;
}
} );
@@ -404,18 +419,24 @@ public class SOAPParametersPage extends DataSetWizardPage
*/
public IWizardPage getNextPage( )
{
- saveToModel( );
IWizardPage page = super.getNextPage( );
- if ( page instanceof SOAPRequestPage )
- try
- {
- ( (SOAPRequestPage) page ).refresh( );
- }
- catch ( OdaException e )
+ if ( modelChanged )
+ {
+ saveToModel( );
+ if ( page instanceof SOAPRequestPage )
{
- this.setErrorMessage( e.getMessage( ) );
+ try
+ {
+ ( (SOAPRequestPage) page ).refresh( );
+ modelChanged = false;
+ }
+ catch ( OdaException e )
+ {
+ this.setErrorMessage( e.getMessage( ) );
+ }
}
+ }
return page;
}