Jacques Le Roux wrote: > Done at revision: 918476 >>>>>>> >>>>>>> >>>>>>> >>>>>>> --- >>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java >>>>>>> >>>>>>> >>>>>>> (original) >>>>>>> +++ >>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java >>>>>>> >>>>>>> >>>>>>> Mon Feb 22 16:34:47 2010 >>>>>>> @@ -157,7 +157,7 @@ >>>>>>> newValue = >>>>>>> getInMemoryPersistedFromField(session, context); >>>>>>> if (Debug.verboseOn()) >>>>>>> Debug.logVerbose("In user >>>>>>> getting value for field from [" + this.fromField.getOriginalName() + >>>>>>> "]: " + newValue, module); >>>>>>> } else if (!this.valueExdr.isEmpty()) { >>>>>>> - newValue = >>>>>>> this.valueExdr.expandString(context); >>>>>>> + newValue = this.valueExdr.expand(context); >>>>>>> } >>>>>>> } else if (this.fromScope != null&& >>>>>>> this.fromScope.equals("application")) { >>>>>>> if (!this.fromField.isEmpty()) { >>>>>>> @@ -165,20 +165,20 @@ >>>>>>> newValue = >>>>>>> getInMemoryPersistedFromField(servletContext, context); >>>>>>> if (Debug.verboseOn()) Debug.logVerbose("In >>>>>>> application getting value for field from [" + >>>>>>> this.fromField.getOriginalName() + "]: " + newValue, module); >>>>>>> } else if (!this.valueExdr.isEmpty()) { >>>>>>> - newValue = >>>>>>> this.valueExdr.expandString(context); >>>>>>> + newValue = this.valueExdr.expand(context); >>>>>>> } >>>>>>> } else { >>>>>>> if (!this.fromField.isEmpty()) { >>>>>>> newValue = this.fromField.get(context); >>>>>>> if (Debug.verboseOn()) Debug.logVerbose("In >>>>>>> screen getting value for field from [" + >>>>>>> this.fromField.getOriginalName() + "]: " + newValue, module); >>>>>>> } else if (!this.valueExdr.isEmpty()) { >>>>>>> - newValue = >>>>>>> this.valueExdr.expandString(context); >>>>>>> + newValue = this.valueExdr.expand(context); >>>>>>> } >>>>>>> } >>>>>>> >>>>>>> // If newValue is still empty, use the default value >>>>>>> if (ObjectType.isEmpty(newValue)&& >>>>>>> !this.defaultExdr.isEmpty()) { >>>>>>> - newValue = this.defaultExdr.expandString(context); >>>>>>> + newValue = this.defaultExdr.expand(context); >>>>>>> } >>>>>>> >>>>>>> if (UtilValidate.isNotEmpty(this.type)) {
When I originally did this change, it broke ap/ar webapps. So, I reverted it, 'cuz I didn't have time to look into it. Then, when I fixed simpleTypeConvert, ap/ar broke *again*. This was a clue, to tell me that the apps themselves were broken, and not the underlying code. The exception in both cases was that organizationPartyId wasn't being passed into a service. Both this change and the simpleTypeConvert one ended up changing an empty string to null. So, what was happening, was that an empty string was being passed to the service, which was allowed. Null was not, so that's why it failed. This also tells me that whoever wrote these apps(ap/ar) didn't actually test that organizationPartyId and defaultOrganizationPartyId weren't being set correctly. In summary, I'm happy that this change was finally able to go in.