<!-- wqc 修改的时候 会新增一条记录,并且将标识设为1其余的设为空,需要将party的默认地址重新设置一下 -->
<if-compare-field to-field="parameters.defaultShipAddr" field="oldValue.contactMechId" operator="equals">
<set-service-fields service-name="setPartyProfileDefaults" map="parameters" to-map="partyProfileDefaultsCtx"/>
<set field="partyProfileDefaultsCtx.defaultShipAddr" from-field="newValue.contactMechId"/>
<set field="partyProfileDefaultsCtx.partyId" from-field="userLogin.partyId"/>
<set field="partyProfileDefaultsCtx.productStoreId" from-field="parameters.productStoreId"/>
<set field="partyProfileDefaultsCtx.companyId" from-field="parameters.companyId"/>
<call-service service-name="setPartyProfileDefaults" in-map-name="partyProfileDefaultsCtx"/>
</if-compare-field>
原文:http://www.cnblogs.com/wangqc/p/ofbiz_postalAddress.html