Users - Action BSH Script Equivalent Java Function

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Users - Action BSH Script Equivalent Java Function

Vinay Agarwal

Hello,

 

I like to use IDE even to type BSH code since it helps with syntax. For Action BSH scripts, I am not able to do that since IDE doesn’t find parameters and context etc. variables. What would be a BSH action script equivalent Java function header? I am looking for something like this:

 

void myActionScript(HttpServletRequest request, HttpServletRequest parameters, Map context, …….) {

}

 

Thanks in advance.

Vinay Agarwal


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Action BSH Script Equivalent Java Function

Vinay Agarwal

I came up with the following after looking at MethodContext.java in minilang. But it still doesn’t have “context” declaration. Am I even close here?

Regards,

Vinay Agarwal

 

    public static void myActionScript(HttpServletRequest request, HttpServletResponse response, ClassLoader loader) {

        Map parameters = UtilHttp.getParameterMap(request);

        Locale locale = UtilHttp.getLocale(request);

        LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");

        GenericDelegator delegator = (GenericDelegator)request.getAttribute("delegator");

        Security security = (Security) request.getAttribute("security");

        GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin");

        …

    }

 

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Vinay Agarwal
Sent: Tuesday, March 14, 2006 2:52 PM
To: 'OFBiz Users / Usage Discussion'
Subject: [OFBiz] Users - Action BSH Script Equivalent Java Function

 

Hello,

 

I like to use IDE even to type BSH code since it helps with syntax. For Action BSH scripts, I am not able to do that since IDE doesn’t find parameters and context etc. variables. What would be a BSH action script equivalent Java function header? I am looking for something like this:

 

void myActionScript(HttpServletRequest request, HttpServletRequest parameters, Map context, …….) {

}

 

Thanks in advance.

Vinay Agarwal


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users