[OFBiz] SVN: r6715 - in trunk/applications/party: entitydef src/org/ofbiz/party/party widget/partymgr
jonesde@svn.ofbiz.org
jonesde at svn.ofbiz.org
Sat Feb 11 06:40:32 CST 2006
Author: jonesde
Date: 2006-02-11 06:40:24 -0600 (Sat, 11 Feb 2006)
New Revision: 6715
Modified:
trunk/applications/party/entitydef/entitygroup.xml
trunk/applications/party/entitydef/entitymodel.xml
trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
trunk/applications/party/widget/partymgr/PartyScreens.xml
Log:
Fixed issue with Person and PartyGroup with description and other Party field updating
Modified: trunk/applications/party/entitydef/entitygroup.xml
===================================================================
--- trunk/applications/party/entitydef/entitygroup.xml 2006-02-11 08:27:30 UTC (rev 6714)
+++ trunk/applications/party/entitydef/entitygroup.xml 2006-02-11 12:40:24 UTC (rev 6715)
@@ -93,6 +93,8 @@
<entity-group group="org.ofbiz" entity="Affiliate" />
<entity-group group="org.ofbiz" entity="Party" />
+ <entity-group group="org.ofbiz" entity="PartyAndGroup" />
+ <entity-group group="org.ofbiz" entity="PartyAndPerson" />
<entity-group group="org.ofbiz" entity="PartyAndUserLogin" />
<entity-group group="org.ofbiz" entity="PartyAndUserLoginAndPerson" />
<entity-group group="org.ofbiz" entity="PartyAttribute" />
Modified: trunk/applications/party/entitydef/entitymodel.xml
===================================================================
--- trunk/applications/party/entitydef/entitymodel.xml 2006-02-11 08:27:30 UTC (rev 6714)
+++ trunk/applications/party/entitydef/entitymodel.xml 2006-02-11 12:40:24 UTC (rev 6715)
@@ -1178,6 +1178,28 @@
<index-field name="externalId"/>
</index>
</entity>
+ <view-entity entity-name="PartyAndGroup"
+ package-name="org.ofbiz.party.party"
+ title="Party and Party Group View Entity">
+ <member-entity entity-alias="PTY" entity-name="Party"/>
+ <member-entity entity-alias="PGRP" entity-name="PartyGroup"/>
+ <alias-all entity-alias="PTY"/>
+ <alias-all entity-alias="PGRP"/>
+ <view-link entity-alias="PTY" rel-entity-alias="PGRP">
+ <key-map field-name="partyId"/>
+ </view-link>
+ </view-entity>
+ <view-entity entity-name="PartyAndPerson"
+ package-name="org.ofbiz.party.party"
+ title="Party and Person View Entity">
+ <member-entity entity-alias="PTY" entity-name="Party"/>
+ <member-entity entity-alias="PERS" entity-name="Person"/>
+ <alias-all entity-alias="PTY"/>
+ <alias-all entity-alias="PERS"/>
+ <view-link entity-alias="PTY" rel-entity-alias="PERS">
+ <key-map field-name="partyId"/>
+ </view-link>
+ </view-entity>
<view-entity entity-name="PartyAndUserLogin"
package-name="org.ofbiz.party.party"
title="Party and Contact Mech View Entity">
Modified: trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
===================================================================
--- trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java 2006-02-11 08:27:30 UTC (rev 6714)
+++ trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java 2006-02-11 12:40:24 UTC (rev 6715)
@@ -257,22 +257,26 @@
return result;
GenericValue person = null;
+ GenericValue party = null;
try {
person = delegator.findByPrimaryKey("Person", UtilMisc.toMap("partyId", partyId));
+ party = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId));
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "person.update.read_failure", new Object[] { e.getMessage() }, locale));
}
- if (person == null) {
+ if (person == null || party == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "person.update.not_found", locale));
}
person.setNonPKFields(context);
+ party.setNonPKFields(context);
try {
person.store();
+ party.store();
} catch (GenericEntityException e) {
Debug.logWarning(e.getMessage(), module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "person.update.write_failure", new Object[] { e.getMessage() }, locale));
@@ -407,7 +411,7 @@
try {
partyGroup = delegator.findByPrimaryKey("PartyGroup", UtilMisc.toMap("partyId", partyId));
- party = partyGroup.getRelatedOne("Party");
+ party = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId));
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
Map messageMap = UtilMisc.toMap("errMessage", e.getMessage());
Modified: trunk/applications/party/widget/partymgr/PartyScreens.xml
===================================================================
--- trunk/applications/party/widget/partymgr/PartyScreens.xml 2006-02-11 08:27:30 UTC (rev 6714)
+++ trunk/applications/party/widget/partymgr/PartyScreens.xml 2006-02-11 12:40:24 UTC (rev 6715)
@@ -324,7 +324,7 @@
<set field="donePage" from-field="parameters.DONE_PAGE" default-value="viewprofile"/>
<set field="partyId" from-field="parameters.partyId"/>
- <entity-one entity-name="Person" value-name="person"/>
+ <entity-one entity-name="PartyAndPerson" value-name="person"/>
</actions>
<widgets>
<decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
@@ -344,7 +344,7 @@
<set field="donePage" from-field="parameters.DONE_PAGE" default-value="viewprofile"/>
<set field="partyId" from-field="parameters.partyId"/>
- <entity-one entity-name="PartyGroup" value-name="partyGroup"/>
+ <entity-one entity-name="PartyAndGroup" value-name="partyGroup"/>
</actions>
<widgets>
<decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
More information about the Svn
mailing list