Jacques, It looks like you're running into problems with this and I started playing with it but stopped as you're clearly working on it right now. The thing to keep in mind is that with the field-name and map-name pattern it could automatically figure out the request-name, but with the the field and map names combined we loose that. So, we have to use both the field and request attributes when the field attribute has a map (ie with a dot). Otherwise, we can expect each of these to break. -David On Feb 3, 2009, at 3:26 PM, [hidden email] wrote: > Author: jleroux > Date: Tue Feb 3 22:26:45 2009 > New Revision: 740490 > > URL: http://svn.apache.org/viewvc?rev=740490&view=rev > Log: > <field-to-request field="(.*)" map-name="(.*)"/> => <field-to- > request field="$2.$1"/> > > Modified: > ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ > PartyContactMechServices.xml > > Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/ > contact/PartyContactMechServices.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml?rev=740490&r1=740489&r2=740490&view=diff > = > = > = > = > = > = > = > = > ====================================================================== > --- ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ > PartyContactMechServices.xml (original) > +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ > PartyContactMechServices.xml Tue Feb 3 22:26:45 2009 > @@ -62,7 +62,7 @@ > <log level="info" message="Creating a PartyContactMech with > id: ${parameters.contactMechId}"/> > <set field="newValue.partyId" from- > field="parameters.partyId"/> > <field-to-result field="contactMechId" map-name="newValue"/> > - <field-to-request field="contactMechId" map-name="newValue"/> > + <field-to-request field="newValue.contactMechId"/> > <set-nonpk-fields map="parameters" value-field="newValue"/> > <now-timestamp field="newValue.fromDate"/> > <create-value value-field="newValue"/> > @@ -172,7 +172,7 @@ > <call-service service-name="createPartyContactMech" in-map- > name="createPartyContactMechMap" break-on-error="true"> > <default-message resource="PartyUiLabels" > property="PartyPostalAddressSuccessfullyCreated"/> > </call-service> > - <field-to-request field="contactMechId" map- > name="newPartyContactMech"/> > + <field-to-request field="newPartyContactMech.contactMechId"/> > <field-to-result field="contactMechId" map- > name="newPartyContactMech"/> > </simple-method> > > @@ -195,7 +195,7 @@ > <call-service service-name="updatePartyContactMech" in-map- > name="updatePartyContactMechMap"> > <default-message resource="PartyUiLabels" > property="PartyPostalAddressSuccessfullyUpdated"/> > </call-service> > - <field-to-request field="contactMechId" map- > name="newPartyContactMech"/> > + <field-to-request field="newPartyContactMech.contactMechId"/> > <field-to-result field="contactMechId" map- > name="newPartyContactMech"/> > </simple-method> > > @@ -219,7 +219,7 @@ > <call-service service-name="createPartyContactMech" in-map- > name="createPartyContactMechMap" break-on-error="true"> > <default-message resource="PartyUiLabels" > property="PartyTelecomNumberSuccessfullyCreated"/> > </call-service> > - <field-to-request field="contactMechId" map- > name="newPartyContactMech"/> > + <field-to-request field="newPartyContactMech.contactMechId"/> > <field-to-result field="contactMechId" map- > name="newPartyContactMech"/> > </simple-method> > > @@ -244,7 +244,7 @@ > <default-message resource="PartyUiLabels" > property="PartyTelecomNumberSuccessfullyUpdated"/> > </call-service> > <log level="info" message="Setting result id: $ > {newPartyContactMech.contactMechId}"/> > - <field-to-request field="contactMechId" map- > name="newPartyContactMech"/> > + <field-to-request field="newPartyContactMech.contactMechId"/> > <field-to-result field="contactMechId" map- > name="newPartyContactMech"/> > </simple-method> > > > |
Administrator
|
Reverted in 740502 for now
Jacques From: "David E Jones" <[hidden email]> > > Jacques, > > It looks like you're running into problems with this and I started playing with it but stopped as you're clearly working on it > right now. > > The thing to keep in mind is that with the field-name and map-name pattern it could automatically figure out the request-name, > but with the the field and map names combined we loose that. > > So, we have to use both the field and request attributes when the field attribute has a map (ie with a dot). Otherwise, we can > expect each of these to break. > > -David > > > On Feb 3, 2009, at 3:26 PM, [hidden email] wrote: > >> Author: jleroux >> Date: Tue Feb 3 22:26:45 2009 >> New Revision: 740490 >> >> URL: http://svn.apache.org/viewvc?rev=740490&view=rev >> Log: >> <field-to-request field="(.*)" map-name="(.*)"/> => <field-to- request field="$2.$1"/> >> >> Modified: >> ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ PartyContactMechServices.xml >> >> Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/ contact/PartyContactMechServices.xml >> URL: >> http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml?rev=740490&r1=740489&r2=740490&view=diff >> = = = = = = = = ====================================================================== >> --- ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ PartyContactMechServices.xml (original) >> +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ PartyContactMechServices.xml Tue Feb 3 22:26:45 2009 >> @@ -62,7 +62,7 @@ >> <log level="info" message="Creating a PartyContactMech with id: ${parameters.contactMechId}"/> >> <set field="newValue.partyId" from- field="parameters.partyId"/> >> <field-to-result field="contactMechId" map-name="newValue"/> >> - <field-to-request field="contactMechId" map-name="newValue"/> >> + <field-to-request field="newValue.contactMechId"/> >> <set-nonpk-fields map="parameters" value-field="newValue"/> >> <now-timestamp field="newValue.fromDate"/> >> <create-value value-field="newValue"/> >> @@ -172,7 +172,7 @@ >> <call-service service-name="createPartyContactMech" in-map- name="createPartyContactMechMap" break-on-error="true"> >> <default-message resource="PartyUiLabels" property="PartyPostalAddressSuccessfullyCreated"/> >> </call-service> >> - <field-to-request field="contactMechId" map- name="newPartyContactMech"/> >> + <field-to-request field="newPartyContactMech.contactMechId"/> >> <field-to-result field="contactMechId" map- name="newPartyContactMech"/> >> </simple-method> >> >> @@ -195,7 +195,7 @@ >> <call-service service-name="updatePartyContactMech" in-map- name="updatePartyContactMechMap"> >> <default-message resource="PartyUiLabels" property="PartyPostalAddressSuccessfullyUpdated"/> >> </call-service> >> - <field-to-request field="contactMechId" map- name="newPartyContactMech"/> >> + <field-to-request field="newPartyContactMech.contactMechId"/> >> <field-to-result field="contactMechId" map- name="newPartyContactMech"/> >> </simple-method> >> >> @@ -219,7 +219,7 @@ >> <call-service service-name="createPartyContactMech" in-map- name="createPartyContactMechMap" break-on-error="true"> >> <default-message resource="PartyUiLabels" property="PartyTelecomNumberSuccessfullyCreated"/> >> </call-service> >> - <field-to-request field="contactMechId" map- name="newPartyContactMech"/> >> + <field-to-request field="newPartyContactMech.contactMechId"/> >> <field-to-result field="contactMechId" map- name="newPartyContactMech"/> >> </simple-method> >> >> @@ -244,7 +244,7 @@ >> <default-message resource="PartyUiLabels" property="PartyTelecomNumberSuccessfullyUpdated"/> >> </call-service> >> <log level="info" message="Setting result id: $ {newPartyContactMech.contactMechId}"/> >> - <field-to-request field="contactMechId" map- name="newPartyContactMech"/> >> + <field-to-request field="newPartyContactMech.contactMechId"/> >> <field-to-result field="contactMechId" map- name="newPartyContactMech"/> >> </simple-method> >> >> >> > |
Free forum by Nabble | Edit this page |