Re: how to move variable from a FTL file to a Screen

2010-05-28 Thread Patrick
Hi Bruno,
do this in your ftl
<#assign parameters=context.parameters/>
<#assign tmp=parameters.put("partyId", partyId)/>
-patrick

On Sat, May 29, 2010 at 1:03 AM, Bruno Busco  wrote:
> Hi Adrian,
> I am trying to assign a value to globalContext in a FTL file but receive
> this error:
>
> Expression globalContext is undefined on line 192, column 3 in
> component://widget/templates/htmlScreenMacroLibrary.ftl
>
>
> I am trying to use this tecnique to finalize the patch in this JIRA
> https://issues.apache.org/jira/browse/OFBIZ-3625
>
> I have not found any example of setting of globalContext in FTL in OFBiz.
> Could you please help me on this?
>
> -Bruno
>
>
> 2010/5/19 Adrian Crum 
>
>> Try
>>
>> <#assign globalContext.facilityId="4"/>
>>
>> It might be a scope issue where higher-level artifacts can't see variables
>> declared in lower-level artifacts. All artifacts can see the global context.
>>
>> -Adrian
>>
>>
>> On 5/19/2010 1:36 PM, Patrick wrote:
>>
>>> In my FTL file I call
>>>
>>> ${screens.render("component://common/widget/CommonScreens.xml#AddProducerToFacility")}
>>>
>>> but I need the variable facilityId at that screen level.  In my FTL I
>>> tried this
>>>
>>> <#assign parameters.facilityId="4"/>
>>> <#assign context.facilityId="4"/>
>>>
>>> and various other combinations.  How can I pass a variable from an FTL
>>> to a screen?
>>>
>>>
>


Re: how to move variable from a FTL file to a Screen

2010-05-28 Thread Bruno Busco
Hi Adrian,
I am trying to assign a value to globalContext in a FTL file but receive
this error:

Expression globalContext is undefined on line 192, column 3 in
component://widget/templates/htmlScreenMacroLibrary.ftl


I am trying to use this tecnique to finalize the patch in this JIRA
https://issues.apache.org/jira/browse/OFBIZ-3625

I have not found any example of setting of globalContext in FTL in OFBiz.
Could you please help me on this?

-Bruno


2010/5/19 Adrian Crum 

> Try
>
> <#assign globalContext.facilityId="4"/>
>
> It might be a scope issue where higher-level artifacts can't see variables
> declared in lower-level artifacts. All artifacts can see the global context.
>
> -Adrian
>
>
> On 5/19/2010 1:36 PM, Patrick wrote:
>
>> In my FTL file I call
>>
>> ${screens.render("component://common/widget/CommonScreens.xml#AddProducerToFacility")}
>>
>> but I need the variable facilityId at that screen level.  In my FTL I
>> tried this
>>
>> <#assign parameters.facilityId="4"/>
>> <#assign context.facilityId="4"/>
>>
>> and various other combinations.  How can I pass a variable from an FTL
>> to a screen?
>>
>>


Re: how to move variable from a FTL file to a Screen

2010-05-20 Thread Vicky Park

How about to utilize this code?

<#if productIds?has_content>
<#list productIds as productId>
${setRequestAttribute("name1", value1)} <#-- assign value1-->
${setRequestAttribute("name2", value2)} <#-- assign value1-->
${setRequestAttribute("name3", value3)} <#-- assign value1-->


${screens.render("component://common/widget/CommonScreens.xml#AddProducerToFacility")} 




Let me know if doesn't work.

Regards,
Soon-Won Park

On 5/19/2010 4:36 PM, Patrick wrote:

In my FTL file I call
${screens.render("component://common/widget/CommonScreens.xml#AddProducerToFacility")}

but I need the variable facilityId at that screen level.  In my FTL I
tried this

<#assign parameters.facilityId="4"/>
<#assign context.facilityId="4"/>

and various other combinations.  How can I pass a variable from an FTL
to a screen?

   





Re: how to move variable from a FTL file to a Screen

2010-05-19 Thread Adrian Crum

Try

<#assign globalContext.facilityId="4"/>

It might be a scope issue where higher-level artifacts can't see 
variables declared in lower-level artifacts. All artifacts can see the 
global context.


-Adrian

On 5/19/2010 1:36 PM, Patrick wrote:

In my FTL file I call
${screens.render("component://common/widget/CommonScreens.xml#AddProducerToFacility")}

but I need the variable facilityId at that screen level.  In my FTL I
tried this

<#assign parameters.facilityId="4"/>
<#assign context.facilityId="4"/>

and various other combinations.  How can I pass a variable from an FTL
to a screen?



how to move variable from a FTL file to a Screen

2010-05-19 Thread Patrick
In my FTL file I call
${screens.render("component://common/widget/CommonScreens.xml#AddProducerToFacility")}

but I need the variable facilityId at that screen level.  In my FTL I
tried this

<#assign parameters.facilityId="4"/>
<#assign context.facilityId="4"/>

and various other combinations.  How can I pass a variable from an FTL
to a screen?