Since all the methods are split now - it is wise to show errors by checking error_list for all methods
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@681756 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -874,19 +874,20 @@ under the License.
|
||||
</if-empty>
|
||||
|
||||
<call-simple-method method-name="createUpdatePerson"/>
|
||||
<if-empty field="error_list">
|
||||
<call-simple-method method-name="setAnonUserLogin"/>
|
||||
|
||||
<set field="partyRoleContext.partyId" from-field="partyId"/>
|
||||
<set field="partyRoleContext.roleTypeId" from-field="parameters.roleTypeId"/>
|
||||
<set field="partyRoleContext.userLogin" from-field="userLogin"/>
|
||||
<call-service service-name="createPartyRole" in-map-name="partyRoleContext"/>
|
||||
|
||||
</if-empty>
|
||||
<call-simple-method method-name="createUpdateShippingAddress"/>
|
||||
<set field="parameters.phoneContactMechPurposeTypeId" value="PRIMARY_PHONE"/>
|
||||
<call-simple-method method-name="createUpdateTelecomNumber"/>
|
||||
<set field="parameters.emailContactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
|
||||
<call-simple-method method-name="createUpdateEmailAddress"/>
|
||||
|
||||
<check-errors/>
|
||||
<!-- Set partyId, in shoppingCart -->
|
||||
<call-object-method obj-field-name="shoppingCart" method-name="setUserLogin">
|
||||
<field field-name="userLogin" type="org.ofbiz.entity.GenericValue"/>
|
||||
@@ -908,7 +909,7 @@ under the License.
|
||||
<simple-method method-name="createUpdatePerson" short-description="Create and update a person" login-required="false">
|
||||
<call-map-processor xml-resource="org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml"
|
||||
processor-name="person" in-map-name="parameters" out-map-name="personMap"/>
|
||||
<check-errors/>
|
||||
<if-empty field="error_list">
|
||||
<set-service-fields service-name="createPerson" map-name="personMap" to-map-name="personContext"/>
|
||||
<if-empty field="partyId">
|
||||
<call-service service-name="createPerson" in-map-name="personContext">
|
||||
@@ -923,19 +924,21 @@ under the License.
|
||||
|
||||
<field-to-request field-name="partyId" request-name="partyId"/>
|
||||
<set field="parameters.partyId" from-field="partyId"/>
|
||||
</if-empty>
|
||||
</simple-method>
|
||||
|
||||
<simple-method method-name="createUpdateUserLogin" short-description="Create and update a user login">
|
||||
<simple-method method-name="createUpdateUserLogin" short-description="Create and update a user login" login-required="false">
|
||||
<if-empty field="userLogin">
|
||||
<call-map-processor xml-resource="org/ofbiz/securityext/login/LoginMapProcs.xml"
|
||||
processor-name="userLogin" in-map-name="parameters" out-map-name="userLoginMap"/>
|
||||
<check-errors/>
|
||||
<if-empty field="error_list">
|
||||
<set-service-fields service-name="createUserLogin" map-name="userLoginMap" to-map-name="userLoginCtx"/>
|
||||
<call-service service-name="createUserLogin" in-map-name="userLoginCtx"/>
|
||||
</if-empty>
|
||||
<else>
|
||||
<call-map-processor xml-resource="org/ofbiz/securityext/login/LoginMapProcs.xml"
|
||||
processor-name="updatePassword" in-map-name="parameters" out-map-name="passwordMap"/>
|
||||
<check-errors/>
|
||||
<if-empty field="error_list">
|
||||
<set-service-fields service-name="updatePassword" map-name="passwordMap" to-map-name="passwordCtx"/>
|
||||
<call-service service-name="updatePassword" in-map-name="passwordCtx">
|
||||
<result-to-field result-name="updatedUserLogin"/>
|
||||
@@ -946,6 +949,7 @@ under the License.
|
||||
<field-to-session field-name="updatedUserLogin" session-name="userLogin"/>
|
||||
</if-compare>
|
||||
<session-to-field field-name="userLogin"/>
|
||||
</if-empty>
|
||||
</else>
|
||||
</if-empty>
|
||||
</simple-method>
|
||||
@@ -971,7 +975,7 @@ under the License.
|
||||
<simple-method method-name="createUpdateTelecomNumber" short-description="Create and update phone number" login-required="false">
|
||||
<call-map-processor xml-resource="org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml"
|
||||
processor-name="phoneNumber" in-map-name="parameters" out-map-name="phoneContext"/>
|
||||
|
||||
<if-empty field="error_list">
|
||||
<set field="phoneContext.partyId" from-field="partyId"/>
|
||||
<set field="phoneContext.roleTypeId" from-field="parameters.roleTypeId"/>
|
||||
<set field="phoneContext.userLogin" from-field="userLogin"/>
|
||||
@@ -991,12 +995,13 @@ under the License.
|
||||
</else>
|
||||
</if-empty>
|
||||
<field-to-request field-name="parameters.phoneContactMechId" request-name="phoneContactMechId"/>
|
||||
</if-empty>
|
||||
</simple-method>
|
||||
|
||||
<simple-method method-name="createUpdateEmailAddress" short-description="Create and update phone number" login-required="false">
|
||||
<call-map-processor xml-resource="org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml"
|
||||
processor-name="emailAddress" in-map-name="parameters" out-map-name="emailAddressContext"/>
|
||||
|
||||
<if-empty field="error_list">
|
||||
<!-- Create Or Update email address -->
|
||||
<set field="emailAddressContext.partyId" from-field="partyId"/>
|
||||
<set field="emailAddressContext.userLogin" from-field="userLogin"/>
|
||||
@@ -1016,12 +1021,13 @@ under the License.
|
||||
</else>
|
||||
</if-empty>
|
||||
<field-to-request field-name="parameters.emailContactMechId" request-name="emailContactMechId"/>
|
||||
</if-empty>
|
||||
</simple-method>
|
||||
|
||||
<simple-method method-name="createUpdateShippingAddress" short-description="create and update shipping address" login-required="false">
|
||||
<call-map-processor xml-resource="org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml"
|
||||
processor-name="shipToAddress" in-map-name="parameters" out-map-name="shipToAddressCtx"/>
|
||||
<check-errors/>
|
||||
<if-empty field="error_list">
|
||||
<set field="shipToAddressCtx.partyId" from-field="partyId"/>
|
||||
<set field="shipToAddressCtx.contactMechPurposeTypeId" value="SHIPPING_LOCATION"/>
|
||||
<if-empty field="parameters.shipToContactMechId">
|
||||
@@ -1056,6 +1062,7 @@ under the License.
|
||||
</else>
|
||||
</if-empty>
|
||||
<field-to-request field-name="parameters.shipToContactMechId" request-name="shipToContactMechId"/>
|
||||
</if-empty>
|
||||
</simple-method>
|
||||
|
||||
<simple-method method-name="getShipOptions" short-description="Get shipping options" login-required="false">
|
||||
@@ -1195,7 +1202,7 @@ under the License.
|
||||
|
||||
<call-simple-method method-name="createUpdateBillingAddress"/>
|
||||
<call-simple-method method-name="createUpdateCreditCard"/>
|
||||
|
||||
<check-errors/>
|
||||
<!--============== Set Payment Method ================-->
|
||||
<set field="paymentMethodId" from-field="parameters.paymentMethodId"/>
|
||||
<set field="cardSecurityCode" from-field="parameters.cardSecurityCode"/>
|
||||
@@ -1217,7 +1224,7 @@ under the License.
|
||||
<call-map-processor xml-resource="org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml"
|
||||
processor-name="billToAddress" in-map-name="parameters" out-map-name="billToAddressCtx"/>
|
||||
</if-compare>
|
||||
<check-errors/>
|
||||
<if-empty field="error_list">
|
||||
<set field="billToAddressCtx.contactMechPurposeTypeId" value="BILLING_LOCATION"/>
|
||||
<set field="billToAddressCtx.partyId" from-field="partyId"/>
|
||||
|
||||
@@ -1290,12 +1297,13 @@ under the License.
|
||||
</if-empty>
|
||||
</if-compare>
|
||||
<field-to-request field-name="parameters.billToContactMechId" request-name="billToContactMechId"/>
|
||||
</if-empty>
|
||||
</simple-method>
|
||||
|
||||
<simple-method method-name="createUpdateCreditCard" short-description="create and update credit card">
|
||||
<call-map-processor xml-resource="org/ofbiz/accounting/payment/PaymentMapProcs.xml"
|
||||
processor-name="createCreditCard" in-map-name="parameters" out-map-name="creditCardContext"/>
|
||||
<check-errors/>
|
||||
<if-empty field="error_list">
|
||||
<set field="creditCardContext.partyId" from-field="partyId"/>
|
||||
<set field="creditCardContext.contactMechId" from-field="parameters.billToContactMechId"/>
|
||||
<if-empty field="parameters.paymentMethodId">
|
||||
@@ -1318,6 +1326,7 @@ under the License.
|
||||
</if-empty>
|
||||
<set field="paymentMethodId" from-field="parameters.paymentMethodId"/>
|
||||
<field-to-request field-name="parameters.paymentMethodId" request-name="paymentMethodId"/>
|
||||
</if-empty>
|
||||
</simple-method>
|
||||
|
||||
</simple-methods>
|
||||
|
||||
Reference in New Issue
Block a user