Author: lektran
Date: Tue Aug 26 04:58:19 2008
New Revision: 689040
URL:
http://svn.apache.org/viewvc?rev=689040&view=revLog:
A better fix for the work I committed in rev. 684244
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=689040&r1=689039&r2=689040&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Tue Aug 26 04:58:19 2008
@@ -43,6 +43,7 @@
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.UtilXml;
import org.ofbiz.base.util.collections.FlexibleMapAccessor;
+import org.ofbiz.base.util.collections.MapStack;
import org.ofbiz.base.util.string.FlexibleStringExpander;
import org.ofbiz.entity.GenericDelegator;
import org.ofbiz.entity.GenericEntityException;
@@ -1413,15 +1414,14 @@
}
Map<String, Object> itemMap = UtilGenerics.checkMap(item);
- Map<String, Object> localContext = new HashMap<String, Object>(context);
+ MapStack<String> localContext = MapStack.create(context);
if (UtilValidate.isNotEmpty(this.getListEntryName())) {
localContext.put(this.getListEntryName(), item);
} else {
- localContext.putAll(itemMap);
- this.setDefaultMapName("listEntryDefaultMap");
- localContext.put("listEntryDefaultMap", itemMap);
+ localContext.push(itemMap);
}
+ localContext.push();
localContext.put("previousItem", previousItem);
previousItem = FastMap.newInstance();
previousItem.putAll(itemMap);
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=689040&r1=689039&r2=689040&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java Tue Aug 26 04:58:19 2008
@@ -714,7 +714,7 @@
//TODO: this may never come up, but if necessary use the FlexibleStringExander to eval the name first: String evaled = this.entryAcsr
}
} else {
- retVal = this.entryAcsr.get(dataMap);
+ retVal = this.entryAcsr.get(dataMap, locale);
}
} else {
//Debug.logInfo("Getting entry, no entryAcsr so using field name " + this.name + " for field " + this.getName() + " of form " + this.modelForm.getName(), module);