Jacopo Cappellato wrote:
> On Apr 9, 2010, at 5:33 PM, Adam Heath wrote:
> 
>> Jacopo Cappellato wrote:
>>> Maybe here the usage of the "CustomMethod" pattern could fit well... not a 
>>> big deal by the way.
>>> The idea is that you enter the customMethodId in place of the service name 
>>> in the condValue field: condValue --> CustomMethod --> serviceName
>>> The nice thing with this approach is that you can define a new 
>>> CustomMethodType for "product promo cond services" (and one for actions) 
>>> and then use drop down to show the available list of services.
>>> This pattern is used in a few other screens.
>> Which would mean condValue is text for some variants, and a drop-down
>> for others.  Is that possible with ofbiz?
> 
> Well, it is rather easy to do.
> 
>> My full plan is to complete rip apart checkCondition and runAction, so
>> that their big if/else blocks go away completely.  At that point,
>> there type drop-down would be completely variable.
> 
> Agreed.
> 
>> It's possible we could change enumeration type PROD_PROMO_IN_PARAM, to
>> have it's own sub-table, then define the service that implements that
>> enumeration.
> 
> I don't get you but don't worry, I am just probably reading too fast because 
> I am busy.
> BTW, I hope you got what I was saying about CustomMethod.

Yeah, I got what you were saying.  I just had a different suggestion/idea.

Enumeration is to Party, as ProdPromoInputEnumeration is to Person.

enumTypeId(PROD_PROMO_IN_PARAM).hasTable=Y would be similiar to
partyTypeId(PERSON).hasTable=Y.

Reply via email to