ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Gray <scott.g...@hotwaxmedia.com>
Subject Re: Using <call-bsh> in minilang
Date Wed, 09 Mar 2011 08:11:45 GMT
delegator is always available in the context of a minilang method so you don't need to do anything
special to reference it in the call-bsh tag.  In the example below, the call-class-method
tag could have been used instead as well.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 9/03/2011, at 4:23 AM, Justin Robinson wrote:

> I was under the impression it was the ofbiz mini-lang not the opentaps
> mini-lang, I'm asking about mini-lang syntax not opentaps application
> logic.(For this reason I didn't edit out opentaps related code from my
> example...)
> 
> I'm trying to discover how parameters are passed around in mini-lang,
> nothing to do with opentaps. Online documentation and associated books
> haven't made this clear to me. Which is why I'm asking here.
> 
> I think I know at this stage of the game what is related to the ofbiz
> framework as opposed to the opentaps implementation...my apologies if
> I'm under some strange misapprehension.
> 
> On Tue, Mar 8, 2011 at 2:49 PM, Jacques Le Roux
> <jacques.le.roux@les7arts.com> wrote:
>> Please ask rather Opentaps questions on Opentaps forum
>> 
>> Thanks
>> 
>> Jacques
>> 
>> From: "Justin Robinson" <justin@venturenet.co.za>
>>> 
>>> I've been trying to wing it with minilang, it seems pretty straight
>>> forward...but I ended up with a situation where I could either go with
>>> minlang recursion (no clue how to handle the ins and outs) or a bsh
>>> script, since the function I need is already defined in a java class
>>> I'm trying to go with the latter.
>>> 
>>> The method I wish to use requires a delegator as an argument, how
>>> would I provide this from within a minilang script?
>>> Also is it possible to set a field field="field" from-field="declared
>>> inside" <call-bsh></call-bsh> tag.(see example)
>>> 
>>> fragment:
>>> 
>>> <!--The objective here is to look up the CustRequestRole entity of
>>> roleTypeId:
>>> CONTACT, to get the contact partyId so it's email address can be used if
>>> there is none on the account -->
>>> <if-empty field="parameters.sendTo">
>>> <call-bsh>
>>> String contactPartyId =
>>> 
>>> com.opensourcestrategies.crmsfa.cases.UtilCase.getCasePrimaryContactPartyId(delegator,
>>> custRequestId));
>>>                </call-bsh>
>>> <set field="getEmail.partyId" from-field="contactPartyId" />
>>> <call-service service-name="getPartyEmail"
>>> in-map-name="getEmail">
>>> <result-to-field result-name="emailAddress" field="parameters.sendTo" />
>>> </call-service>
>>> </if-empty>
>>> 
>>> 
>>> --
>>> Regards,
>>> Justin
>>> Venture-Net Research & Development
>>> 
>> 
>> 
> 
> 
> 
> -- 
> Regards,
> Justin
> Venture-Net Research & Development


Mime
View raw message