Posted by
David E Jones-2 on
Aug 05, 2006; 4:01pm
URL: http://ofbiz.116.s1.nabble.com/Re-svn-commit-r429000-incubator-ofbiz-trunk-applications-product-script-org-ofbiz-product-promo-Proml-tp170388.html
On Aug 5, 2006, at 7:57 AM,
[hidden email] wrote:
> Modified: incubator/ofbiz/trunk/applications/product/script/org/
> ofbiz/product/promo/PromoServices.xml
> URL:
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/
> applications/product/script/org/ofbiz/product/promo/
> PromoServices.xml?rev=429000&r1=428999&r2=429000&view=diff
> ======================================================================
> ========
> --- incubator/ofbiz/trunk/applications/product/script/org/ofbiz/
> product/promo/PromoServices.xml (original)
> +++ incubator/ofbiz/trunk/applications/product/script/org/ofbiz/
> product/promo/PromoServices.xml Sat Aug 5 06:57:23 2006
> @@ -29,14 +29,13 @@
> <sequenced-id-to-env sequence-name="ProductPromo" env-
> name="newEntity.productPromoId"/>
> <field-to-result field-name="productPromoId" map-
> name="newEntity"/>
>
> - <if-empty field-name="newEntity.userEntered">
> - <string-to-field string="Y" field-
> name="newEntity.userEntered"/>
> - </if-empty>
> + <set value="Y" set-if-empty="true"
> field="newEntity.userEntered"/>
> +
There was at least one more of these in this commit, but I'll just
use this one as an example.
There is a problem with this because the set operation is not
equivalent to the if-empty + string-to-field. In other words, you
still need the if-empty around the set operation.
The reason is that if newEntity.userEntered is NOT empty then with
the if-empty tag it will do nothing, but without the if-empty tag it
will still do the set operation!
In other words, the set-if-empty attribute does not mean "set only if
empty" it means "set if empty or not empty".
-David