Hari, I am pretty sure that I have understood your problem. Here are few comments from my side: 1) AFAIK, you can never send a Java object other than String and Array as a (hidden) parameter from FTL. What you can send is string values and array. The reason is there are two major methods available with a request object to fetch parameters: String getParameters(String) and String[] getParameterValues(String). You can't fetch any parameter whose value is a Java Object of other types. 2) For your problem, when you catch the parameters in .bsh, instead of putting them in context try using request.setAttribute() method. 3) Now in your Java event use request.getAttribute() method and it should work.
-- Thanks & Regards Mridul Pathak Hotwax Media http://www.hotwaxmedia.com [EMAIL PROTECTED] On Fri, Dec 5, 2008 at 8:37 AM, Hari Plaikoil <[EMAIL PROTECTED]>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-tp20790183p20847035.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > >