summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorning.zhang2011-09-20 23:06:47 (EDT)
committer xgu2011-10-25 02:10:08 (EDT)
commit74c63dc76d87fa571952b3b733ebe7bc1518c190 (patch)
tree4aa85dc36f4bd9f4a7713b3f6b3828c9d01b1a0f
parent8f56db0cadf37690a4a954ddeb13a98c39b71e7d (diff)
downloadorg.eclipse.birt-74c63dc76d87fa571952b3b733ebe7bc1518c190.zip
org.eclipse.birt-74c63dc76d87fa571952b3b733ebe7bc1518c190.tar.gz
org.eclipse.birt-74c63dc76d87fa571952b3b733ebe7bc1518c190.tar.bz2
- Summary: An error message will be shown if a required field is empty. - Bugzilla Bug(s) Resolved: None - Description: An error message will be shown if a required field is empty. - Tests Description: Manual Test - Code Reviewer: None - Files Added: None - Files Edited: None - Files Deleted: None - Notes to Build Team: None - Notes to Developers: None - Notes to QA: None - Notes to Documentation: None
-rw-r--r--UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/nls/messages.properties3
-rw-r--r--UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/BindingDialogHelper.java28
2 files changed, 24 insertions, 7 deletions
diff --git a/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/nls/messages.properties b/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/nls/messages.properties
index 9b7fe88..2da6a9c 100644
--- a/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/nls/messages.properties
+++ b/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/nls/messages.properties
@@ -4613,7 +4613,8 @@ BindingDialogHelper.text.displayNameID=Di&splay Name ID:
BindingDialogHelper.bindingName.dataitem=Column Binding
BindingDialogHelper.bindingName.aggregation=Aggregation
BindingDialogHelper.error.nameduplicate=A Column Binding named as {0} already exists.
-BindingDialogHelper.error.improperexpression=Aggregation on cube measure can not be such type: "{0}"
+BindingDialogHelper.error.improperexpression=Aggregation on cube measure cannot be such type: "{0}"
+BindingDialogHelper.error.empty={0} is required.
BindingDialogHelper.text.Colon=:
BindingDialogHelper.warning.function=The recommended data type for current function is "{0}", do you really want to keep the data type you selected?
BindingDialogHelper.warning.parameter=The return data type of expression "{0}" is not supported for parameter "{1}", do you really want to keep it?
diff --git a/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/BindingDialogHelper.java b/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/BindingDialogHelper.java
index 99b51dc..865fe60 100644
--- a/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/BindingDialogHelper.java
+++ b/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/BindingDialogHelper.java
@@ -1029,6 +1029,20 @@ public class BindingDialogHelper extends AbstractBindingDialogHelper
messageLine.setLayoutData( layoutData );
}
+ public void setMessage( String message )
+ {
+ this.messageLine.setText( message );
+ this.messageLine.setImage( null );
+ }
+
+ public void setErrorMessage( String message )
+ {
+ this.messageLine.setText( message );
+ this.messageLine.setImage( PlatformUI.getWorkbench( )
+ .getSharedImages( )
+ .getImage( ISharedImages.IMG_OBJS_ERROR_TSK ) );
+ }
+
private void verifyInput( )
{
if ( isRef )
@@ -1069,19 +1083,17 @@ public class BindingDialogHelper extends AbstractBindingDialogHelper
if ( computedColumn.getName( ).equals( txtName.getText( ) ) )
{
dialog.setCanFinish( false );
- this.messageLine.setText( Messages.getFormattedString( "BindingDialogHelper.error.nameduplicate", //$NON-NLS-1$
+ setErrorMessage( Messages.getFormattedString( "BindingDialogHelper.error.nameduplicate", //$NON-NLS-1$
new Object[]{
txtName.getText( )
} ) );
- this.messageLine.setImage( PlatformUI.getWorkbench( )
- .getSharedImages( )
- .getImage( ISharedImages.IMG_OBJS_ERROR_TSK ) );
return;
}
}
}
- this.messageLine.setText( "" ); //$NON-NLS-1$
- this.messageLine.setImage( null );
+
+ setMessage( "" ); //$NON-NLS-1$
+
if ( txtExpression != null
&& ( txtExpression.getText( ) == null || txtExpression.getText( )
.trim( )
@@ -1125,6 +1137,10 @@ public class BindingDialogHelper extends AbstractBindingDialogHelper
|| paramValue.trim( ).equals( "" ) ) //$NON-NLS-1$
{
dialog.setCanFinish( false );
+ setErrorMessage( Messages.getFormattedString( "BindingDialogHelper.error.empty", //$NON-NLS-1$
+ new String[]{
+ param.getDisplayName( )
+ } ) );
return;
}
}