* @param scriptParams Map<String,String> of script values for objects (with scriptlet evaluated)
*/
protected void prepareScriptParams(Map inputs, Map textParams, Map scriptParams) throws Exception {
List funcParams = function.getParameters();
Parameter param;
for (int i=0; i<funcParams.size(); i++) {
param = (Parameter)funcParams.get(i);
//get param value:
String paramName = param.getName();
Object value = inputs.get(paramName);
//determine text value and script value
String textValue = getTextValue(param, value);
String scriptValue;
if (value == null) {
if (!param.hasNullScriptlet())
throw new MissingParameterException(paramName);
textValue = "";
scriptValue = param.getNullScriptlet();
}
else {
if (param.hasScriptlet()) {
Map scriptletParams = new HashMap(2);
scriptletParams.put(paramName, textValue);
//scriptletParams.put(paramName + ".value", textValue);
scriptValue = scriptParser.setVariables(param.getScriptlet(), scriptletParams);
}
else
scriptValue = textValue;
}