}
if(multiValue == null)
multiValue = new Object[]{null};
ForEach forEach = (ForEach) (pageContext.getAttribute("_forEach"));
//find array values
if (multiValue.length == 1 /*&& multiValue[0]!=null*/ && mappedResult != null) {
int i=1;
Vector valueList = new Vector();
if(UEngineUtil.isNotEmpty(""+multiValue[0]))
valueList.add(multiValue[0]);
else
i=0;
//bug fix by yookjy (checkbox addrow)
if (forEach != null) {
String variableName = forEach.getVariablename().toLowerCase();
String postFix = null;
if (mappedResult.get(variableName) != null && !UEngineUtil.isNotEmpty(""+multiValue[0])) {
valueList.add(multiValue[0]);
}
for(int j=0; j<mappedResult.size(); j++) {
postFix = "[" + (j + 1) + "]";;
if (mappedResult.containsKey(variableName + postFix)) {
valueList.add(mappedResult.get(name + postFix));
}
}
} else {
String valueKey = name + "[]";
if (mappedResult.containsKey(valueKey)) {
for (int k=i ; k < 200 ; k++) {
valueKey = name + "["+k+"]";
if(mappedResult.containsKey(valueKey)){
valueList.add(mappedResult.get(valueKey));
}
}
}
}
if(valueList.size() > 0){
multiValue = new Object[valueList.size()];
valueList.toArray(multiValue);
}
}
//narrowing for 'ForEach' scope
if (forEach != null) {
int index = forEach.getCurrentIndex();
//case of indexed by rolemapping
if (multiValue[0] instanceof RoleMapping) {
RoleMapping roleMapping = (RoleMapping)multiValue[0];
if(roleMapping.size() <= index)