summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorning.zhang2012-04-17 00:38:50 (EDT)
committer dgao2012-04-17 00:38:50 (EDT)
commitac573a603252351a30b8cd54e9c94277b4fdb89b (patch)
tree7a7d186905571b642c45127018bcda08db90a719
parent2521efac12592592aa2d184b0ebee762de1cf606 (diff)
downloadorg.eclipse.birt-ac573a603252351a30b8cd54e9c94277b4fdb89b.zip
org.eclipse.birt-ac573a603252351a30b8cd54e9c94277b4fdb89b.tar.gz
org.eclipse.birt-ac573a603252351a30b8cd54e9c94277b4fdb89b.tar.bz2
Summary: Added multiple default values to the selection list.
Description of Issue: [BZ]Default parameter is not visible on listbox Description of Resolution: Added multiple default values, which are not in the selection list, to the selection list.
-rw-r--r--viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/ParameterUtility.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/ParameterUtility.java b/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/ParameterUtility.java
index 0967996..87a39bf 100644
--- a/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/ParameterUtility.java
+++ b/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/ParameterUtility.java
@@ -148,12 +148,19 @@ public class ParameterUtility
{
if ( DataUtil.contain( (List<?>)defaultValues, displayValue, true ) )
{
- parameterBean.setDefaultValueInList( true );
+ parameterBean.setDefaultValueInList( true );
+
+ // remove current value from the defaultvalues list
+ defaultValues.remove(displayValue);
}
}
+ // if it is a single default value
else if ( DataUtil.equals( displayValue, parameterBean.getDefaultValue( ) ) )
{
parameterBean.setDefaultValueInList( true );
+
+ // remove current value from the defaultvalues list
+ defaultValues.remove(displayValue);
}
}
}
@@ -171,6 +178,17 @@ public class ParameterUtility
.getValue( ) ) );
isDisplayTextInList = true;
}
+
+ // handle multiple default values
+ if ( defaultValues != null && defaultValues.size() > 0 )
+ {
+ for (int i = 0; i < defaultValues.size(); i++)
+ {
+ // add these default values which are not in the selectionList as string values,
+ // for those values have already been evaluated and are of string type.
+ processedList.add(i, new ParameterSelectionChoice( defaultValues.get(i), defaultValues.get(i) ) );
+ }
+ }
parameterBean.setDisplayTextInList( isDisplayTextInList );
}