Hi Hari

tou wrote..

Third, on .ftl file I catch the Map and JRDataSource which has been sent by
.bsh file (on context) before. And here is the problem : I want to send
(again) both of the parameters to become input parameters for a java's
event. 

so, if you want to send the same Maps for next request then you can put the
same in context in bsh and fetch in your java file where you want. 
in ftl file Maps handling is not so good so if you want to use the same
process you first change Maps to list there are many method toList(Maps map)
available in ofbiz it will easier to handle the list.

In case you use the Maps in ftls it has problem because The ``hash'' type of
the FreeMarker Template Language (FTL) is not the same as Java's Map. FTL's
hash is an associative array too, but it uses string keys exclusively. 

i understand your problem but if you give me some idea about what you want
to do, so may be i can suggest you alternative.



Hari Plaikoil wrote:
> 
> Hi Nalin, thanks for your response. I'll try to describe my process's path
> :
> 
> First, when I click a submit link, it will call java service. The output
> of the java service are Map and JRDataSource. (on this service, there is
> no problem)
> 
> Second, through a .bsh file, I catch the both of the parameters and put
> them on context (on this .bsh there is no problem), and I pass the context
> to .ftl file
> 
> Third, on .ftl file I catch the Map and JRDataSource which has been sent
> by .bsh file (on context) before. And here is the problem : I want to send
> (again) both of the parameters to become input parameters for a java's
> event.
> I don't know how to assign both of this parameters on ftl to become
> attribute. So, when I catch them on java's event by code
> "request.getAttribute("Map")" it will not give me null value. 
> 
> I don't want to send both of the parameters on .ftl by @inputHidden. All
> my problem is between .ftl and java's event. There is no screen widget
> here. 
> 
> That's all. I hope you have a clear view now on my problem.
> 
> Thanks
> 
> 
> nalin chandra wrote:
>> 
>> Hi 
>> Sorry but, i don't understand your problem completely. But what ever i
>> understand from your conversation with Scott, i think you want to send
>> value through ftl file.
>> 
>> So you try
>> <set field="abc" from-field="parameters.abc"/>
>> <set field="xyz" from-field="parameters.xyz"/>
>> between screens <actions></actions> tag.
>> 
>> 
>> 
>> 
>> Hari Plaikoil wrote:
>>> 
>>> Dear all,
>>> 
>>> Could you tell me how to pass a Map's parameter from ftl to java? 
>>> 
>>> When in ftl, the parameter has data. But when I call it in java's method
>>> by this code below, I got null value:
>>> 
>>>  Map<String, Object> jPrm = (Map<String,
>>> Object>)request.getAttribute("jrParameters");
>>>  JRDataSource jrDataSource = (JRDataSource)
>>> request.getAttribute("jrDataSource");
>>> 
>>>  In this case, I want to pass jrParameter and jrDatasource to make a
>>> report.
>>> 
>>> Please, help me...
>>> 
>>> Thanks.
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/passing-map-parameter-from-ftl-to-event-type-java-tp20790183p20862259.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to