You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2009/05/01 10:15:41 UTC
svn commit: r770575 -
/ofbiz/branches/release4.0/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
Author: lektran
Date: Fri May 1 08:15:41 2009
New Revision: 770575
URL: http://svn.apache.org/viewvc?rev=770575&view=rev
Log:
Merged from trunk r770571
Fix bug where a list was inadvertently being appended to rather than replaced. Reported in OFBIZ-2396 by Brian Sanders
Modified:
ofbiz/branches/release4.0/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
Modified: ofbiz/branches/release4.0/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml?rev=770575&r1=770574&r2=770575&view=diff
==============================================================================
--- ofbiz/branches/release4.0/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml (original)
+++ ofbiz/branches/release4.0/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml Fri May 1 08:15:41 2009
@@ -1074,7 +1074,7 @@
<set from-field="picklistRoleInfoList" field="picklistInfo.picklistRoleInfoList"/>
<set from-field="picklistStatusHistoryInfoList" field="picklistInfo.picklistStatusHistoryInfoList"/>
<set from-field="picklistBinInfoList" field="picklistInfo.picklistBinInfoList"/>
- <string-to-list string="sequenceId" list-name="orderBy"/>
+ <set value="sequenceId" field="orderBy" type="List"/>
<get-related-one value-name="picklist" relation-name="StatusItem" to-value-name="picklistInfo.statusItem" use-cache="true"/>
<get-related-one value-name="picklist" relation-name="Facility" to-value-name="picklistInfo.facility" use-cache="true"/>
<get-related-one value-name="picklist" relation-name="ShipmentMethodType" to-value-name="picklistInfo.shipmentMethodType" use-cache="true"/>
Re: svn commit: r770575 - /ofbiz/branches/release4.0/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
Posted by Scott Gray <sc...@hotwaxmedia.com>.
I don't just make this stuff up :-)
To be honest I didn't try it, but I did look at the code in ObjectType:
} else if ("List".equals(type) ||
"java.util.List".equals(type)) {
if (str.startsWith("[") && str.endsWith("]")) {
return StringUtil.toList(str);
} else {
List<String> tempList = FastList.newInstance();
tempList.add(str);
return tempList;
}
Regards
Scott
HotWax Media
http://www.hotwaxmedia.com
On 1/05/2009, at 8:33 PM, David E Jones wrote:
>
> That's an interesting use of the set operation, does it actually
> work? I would think this would make it try to cast the String to be
> a List rather than adding it to the list.
>
> The normal syntax would be something like:
>
>> <set value="sequenceId" field="orderBy[]"/>
>
> Of course, if you want to make sure the orderBy field is empty
> first, then do a "clear-field" operation on it first.
>
> -David
>
>
> On May 1, 2009, at 2:15 AM, lektran@apache.org wrote:
>
>> Author: lektran
>> Date: Fri May 1 08:15:41 2009
>> New Revision: 770575
>>
>> URL: http://svn.apache.org/viewvc?rev=770575&view=rev
>> Log:
>> Merged from trunk r770571
>> Fix bug where a list was inadvertently being appended to rather
>> than replaced. Reported in OFBIZ-2396 by Brian Sanders
>>
>> Modified:
>> ofbiz/branches/release4.0/applications/product/script/org/ofbiz/
>> shipment/picklist/PicklistServices.xml
>>
>> Modified: ofbiz/branches/release4.0/applications/product/script/org/
>> ofbiz/shipment/picklist/PicklistServices.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml?rev=770575&r1=770574&r2=770575&view=diff
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- ofbiz/branches/release4.0/applications/product/script/org/ofbiz/
>> shipment/picklist/PicklistServices.xml (original)
>> +++ ofbiz/branches/release4.0/applications/product/script/org/ofbiz/
>> shipment/picklist/PicklistServices.xml Fri May 1 08:15:41 2009
>> @@ -1074,7 +1074,7 @@
>> <set from-field="picklistRoleInfoList"
>> field="picklistInfo.picklistRoleInfoList"/>
>> <set from-field="picklistStatusHistoryInfoList"
>> field="picklistInfo.picklistStatusHistoryInfoList"/>
>> <set from-field="picklistBinInfoList"
>> field="picklistInfo.picklistBinInfoList"/>
>> - <string-to-list string="sequenceId" list-name="orderBy"/>
>> + <set value="sequenceId" field="orderBy" type="List"/>
>> <get-related-one value-name="picklist" relation-
>> name="StatusItem" to-value-name="picklistInfo.statusItem" use-
>> cache="true"/>
>> <get-related-one value-name="picklist" relation-
>> name="Facility" to-value-name="picklistInfo.facility" use-
>> cache="true"/>
>> <get-related-one value-name="picklist" relation-
>> name="ShipmentMethodType" to-value-
>> name="picklistInfo.shipmentMethodType" use-cache="true"/>
>>
>>
>
Re: svn commit: r770575 - /ofbiz/branches/release4.0/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
Posted by David E Jones <da...@hotwaxmedia.com>.
That's an interesting use of the set operation, does it actually work?
I would think this would make it try to cast the String to be a List
rather than adding it to the list.
The normal syntax would be something like:
> <set value="sequenceId" field="orderBy[]"/>
Of course, if you want to make sure the orderBy field is empty first,
then do a "clear-field" operation on it first.
-David
On May 1, 2009, at 2:15 AM, lektran@apache.org wrote:
> Author: lektran
> Date: Fri May 1 08:15:41 2009
> New Revision: 770575
>
> URL: http://svn.apache.org/viewvc?rev=770575&view=rev
> Log:
> Merged from trunk r770571
> Fix bug where a list was inadvertently being appended to rather than
> replaced. Reported in OFBIZ-2396 by Brian Sanders
>
> Modified:
> ofbiz/branches/release4.0/applications/product/script/org/ofbiz/
> shipment/picklist/PicklistServices.xml
>
> Modified: ofbiz/branches/release4.0/applications/product/script/org/
> ofbiz/shipment/picklist/PicklistServices.xml
> URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml?rev=770575&r1=770574&r2=770575&view=diff
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- ofbiz/branches/release4.0/applications/product/script/org/ofbiz/
> shipment/picklist/PicklistServices.xml (original)
> +++ ofbiz/branches/release4.0/applications/product/script/org/ofbiz/
> shipment/picklist/PicklistServices.xml Fri May 1 08:15:41 2009
> @@ -1074,7 +1074,7 @@
> <set from-field="picklistRoleInfoList"
> field="picklistInfo.picklistRoleInfoList"/>
> <set from-field="picklistStatusHistoryInfoList"
> field="picklistInfo.picklistStatusHistoryInfoList"/>
> <set from-field="picklistBinInfoList"
> field="picklistInfo.picklistBinInfoList"/>
> - <string-to-list string="sequenceId" list-name="orderBy"/>
> + <set value="sequenceId" field="orderBy" type="List"/>
> <get-related-one value-name="picklist" relation-
> name="StatusItem" to-value-name="picklistInfo.statusItem" use-
> cache="true"/>
> <get-related-one value-name="picklist" relation-
> name="Facility" to-value-name="picklistInfo.facility" use-
> cache="true"/>
> <get-related-one value-name="picklist" relation-
> name="ShipmentMethodType" to-value-
> name="picklistInfo.shipmentMethodType" use-cache="true"/>
>
>