Hello,
Looking at an event handler in beanshell script (e.g. manufacturing/webapp/manufacturing/jobshopmgt/ShowProductionRun.bsh), it contains return statement like the following:
import java.util.*; … delegator = request.getAttribute("delegator"); productionRunId = request.getParameter("productionRunId"); if (!UtilValidate.isEmpty(productionRunId)) { … } return "error";
Thanks in advance.
Regards, Vinay Agarwal _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Hi Vinay,
when a bsh script is used to implement an event, I think that the input parameters are HttpServletRequest request HttpServletResponse response And the output parameter is a String (containing the name of the next view, as defined in the controller). Everything is very similar to an event implemented by a Java method (see for example the methods in applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java). Jacopo Vinay Agarwal wrote: > Hello, > > > > Looking at an event handler in beanshell script (e.g. > manufacturing/webapp/manufacturing/jobshopmgt/ShowProductionRun.bsh), it > contains return statement like the following: > > > > import java.util.*; > > … > > delegator = request.getAttribute("delegator"); > > productionRunId = request.getParameter("productionRunId"); > > if (!UtilValidate.isEmpty(productionRunId)) { > > … > > } > > return "error"; > > > > 1. Is beanshell invocation like a function call? > 2. If yes, what are the parameters passed to it? Are they specified > somewhere in OFBiz? > > > > Thanks in advance. > > > > Regards, > > Vinay Agarwal > > > ------------------------------------------------------------------------ > > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Thanks Jacopo, it clarifies a lot.
Vinay -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Jacopo Cappellato Sent: Wednesday, March 08, 2006 11:02 PM To: OFBiz Users / Usage Discussion Subject: Re: [OFBiz] Users - Are beanshell calls function calls? Hi Vinay, when a bsh script is used to implement an event, I think that the input parameters are HttpServletRequest request HttpServletResponse response And the output parameter is a String (containing the name of the next view, as defined in the controller). Everything is very similar to an event implemented by a Java method (see for example the methods in applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java). Jacopo Vinay Agarwal wrote: > Hello, > > > > Looking at an event handler in beanshell script (e.g. > manufacturing/webapp/manufacturing/jobshopmgt/ShowProductionRun.bsh), it > contains return statement like the following: > > > > import java.util.*; > > . > > delegator = request.getAttribute("delegator"); > > productionRunId = request.getParameter("productionRunId"); > > if (!UtilValidate.isEmpty(productionRunId)) { > > . > > } > > return "error"; > > > > 1. Is beanshell invocation like a function call? > 2. If yes, what are the parameters passed to it? Are they specified > somewhere in OFBiz? > > > > Thanks in advance. > > > > Regards, > > Vinay Agarwal > > > ------------------------------------------------------------------------ > > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Free forum by Nabble | Edit this page |