Bug 203909 If a parameter have no default value, the value of parameter in computed column should not be "null"[07]
Description: If a parameter have no default value, the value of parameter in computed column should not be "null"[07] Build number: 2.2.1.v20070918-0630 Steps to reproduce: 1, New a String type parameter and left the default value empty 2, New a Dataset and new a computed column 3, Specify the expression to params["parameterName"] 4, Preview in dataset Expected result: The value should not be "null" but blank Actual result: The value of computed column is "null"
data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/script/DataAdapterTopLevelScope.java
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.eclipse.birt.core.data.DataType;
import org.eclipse.birt.core.data.DataTypeUtil;
import org.eclipse.birt.core.exception.BirtException;
import org.eclipse.birt.core.script.CoreJavaScriptInitializer;
import org.eclipse.birt.report.model.api.ModuleHandle;
import org.eclipse.birt.report.model.api.ScalarParameterHandle;
import org.eclipse.birt.report.model.api.elements.DesignChoiceConstants;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.ImporterTopLevel;
import org.mozilla.javascript.Scriptable;
/**
 * Top-level scope created by Data Adaptor. This scope provides implementation of some
 * report level script object (e.g., "params")
 */
public class DataAdapterTopLevelScope extends ImporterTopLevel
{
	private static final long serialVersionUID = 4230948829384l;
	
	private static final String PROP_PARAMS = "params";
	private static final String PROP_REPORTCONTEXT = "reportContext";
	private ModuleHandle designModule;
	private Scriptable paramsProp;
	private Object reportContextProp;
	
	/**
	 * Constructor; initializes standard objects in scope
	 * @param cx Context used to initialze scope