summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormianrui2012-05-29 05:53:29 (EDT)
committer mwu2012-05-29 05:53:29 (EDT)
commita89d7f96ef65672c21326585920ffddcd2800535 (patch)
tree0e687a52191a8527ecab4df70d509ce5c993f722
parent6e21f6d06afecb8fb5ea813fdf60d314e7acdf76 (diff)
downloadorg.eclipse.birt-a89d7f96ef65672c21326585920ffddcd2800535.zip
org.eclipse.birt-a89d7f96ef65672c21326585920ffddcd2800535.tar.gz
org.eclipse.birt-a89d7f96ef65672c21326585920ffddcd2800535.tar.bz2
Fix TED – Issue 50157 [420]hive dataset cann't set the parameter.
-rw-r--r--UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/nls/messages.properties1
-rw-r--r--UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/dataset/DataSetParametersPage.java28
2 files changed, 26 insertions, 3 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 3903fde..29c0d04 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
@@ -515,6 +515,7 @@ dataset.editor.dataSource=Data Source
dataset.editor.error.columnOrAliasNameAlreadyUsed=The new column name or alias ({0}) is already used by the column at index {1}.
dataset.editor.error.computedColumnNameAlreadyUsed=The new computed column name ({0}) is already used as column alias of column ({1}) in Output Columns.
dataset.editor.error.duplicateParameterName=Duplicate parameter name.
+dataset.editor.error.nonemptyDefaultvalue=Default value can not be none.
dataset.editor.error.emptyName=Name cannot be blank.
dataset.editor.error.missingComputedColumnExpression=The expression of computed column {0} cannot be null or blank.
dataset.editor.error.missingComputedColumnName=Computed column name cannot be null or blank.
diff --git a/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/dataset/DataSetParametersPage.java b/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/dataset/DataSetParametersPage.java
index 5b4322e..a5fca6e 100644
--- a/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/dataset/DataSetParametersPage.java
+++ b/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/dataset/DataSetParametersPage.java
@@ -1779,6 +1779,12 @@ public class DataSetParametersPage extends AbstractDescriptionPropertyPage imple
this.isOdaDataSetHandle = isOdaDataSetHandle;
structureHandle = getStructureHandle( structureOrHandle );
}
+
+ public void create( )
+ {
+ super.create( );
+ validateSyntax( );
+ }
protected void setSystemHelp( Composite composite )
{
@@ -2293,12 +2299,28 @@ public class DataSetParametersPage extends AbstractDescriptionPropertyPage imple
// blankProperty check
if ( isBlankProperty( dataSetParamName.getText( ) ) )
return getBlankPropertyStatus( ParameterPageUtil.dialogLabels[0] );
-
+ if ( isNull())
+ {
+ return getMiscStatus( IStatus.ERROR,
+ Messages.getString( "dataset.editor.error.nonemptyDefaultvalue" ) );//$NON-NLS-1$
+ }
return getOKStatus( );
}
-
-
+ private boolean isNull( )
+ {
+ if ( defaultValueText.isEnabled( )
+ && defaultValueString.trim( ).length( ) == 0 )
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+
/**
* Checks whether the linked report parameter's data type matches the
* current data set parameter's data type.