Sounds like it's a custom requirement (not really a general/generic requirement), so custom code would be the way to go.
You should be able to write a custom event that enacts this constraint and not modify any of the main OFBiz code.
-David On Dec 14, 2007, at 11:09 AM, Chris Howe wrote:
I'm needing to add an OrderRole to an order, but the role is determined while the individual is shopping before an orderId is known. Very similar to the ten other roles that are added the same way (supplierAgentPartyId, shipFromVendorPartyId, billFromVendorPartyId, etc). There's no need to add another variable and 3 additional methods to access that variable, when a generic HashMap(String, String) will handle an unlimited number of roles.----- Original Message ---- From: Jim Barrows <[EMAIL PROTECTED]> To: dev@ofbiz.apache.org Sent: Friday, December 14, 2007 11:57:38 AM Subject: Re: Generic Roles in Shopping Cart I'm wondering why you want to do that? Are you trying to tie a shopping cart to an individual user? On Dec 14, 2007 10:41 AM, Chris Howe <[EMAIL PROTECTED]> wrote:I'm needing to restrict a custom roleTypeId to 1 per shopping cart,currently the only way to add a custom roleTypeId is through theaddAdditionalRole, which will accept many parties per roleTypeId. I canaccomplish limiting the roleTypeId to one party only by removing allparties from the addAdditionalRole.roleTypeId before adding the limitingrole, but it's not fail safe.----- Original Message ---- From: Jim Barrows <[EMAIL PROTECTED]> To: dev@ofbiz.apache.org Sent: Friday, December 14, 2007 11:35:31 AM Subject: Re: Generic Roles in Shopping Cart What problem are you trying to solve? On Dec 14, 2007 10:19 AM, Chris Howe <[EMAIL PROTECTED]> wrote:I'm needing to restrict a custom roleTypeId to 1 per shopping cartand I'm not finding a way to do that. Would there be any objectiontochanging the way the roles are handled in the shopping cart? Iwould liketo change all of the roles that should be restricted to 1 pershoppingcart from specified variables to a HashMap(String roletypeId, String partyId) in contrast to the additionalPartyRole of HashMap(String roleTypeId, List(String partyId)).-- James A Barrows-- James A Barrows
smime.p7s
Description: S/MIME cryptographic signature