[ https://issues.apache.org/jira/browse/OFBIZ-44?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526666 ]
Jonathon Wong commented on OFBIZ-44: ------------------------------------ We don't always need to create tiny little BSH script files. We can always use "<set field="myField" value="${bsh: some java here;}"/>". As for BSH being loosely-typed, yes that's true. As for BSH being difficult to debug, that's wrong! Without having to re-compile between test runs, you can easily insert debug statements anywhere in a BSH script, on the fly no less. I usually use BSH first, then migrate it to become a service if I need stuff like ECAs, transaction control, etc. In conclusion, I think the "call Java in Screen Widgets" thing is already served by BSH. > Add capability to call java functions directly from actions in screen widgets > ------------------------------------------------------------------------------ > > Key: OFBIZ-44 > URL: https://issues.apache.org/jira/browse/OFBIZ-44 > Project: OFBiz > Issue Type: New Feature > Components: framework > Affects Versions: SVN trunk > Reporter: Vinay Agarwal > Attachments: 06-06-21 Java Action.patch > > > This patch adds capability to call java function directly from actions in > screen widgets. The call looks like > <java location="org.ofbiz.MyActions" invoke="someFunction"/> > The called function is declared as follows > public static void someFunction(Map context) { > ... > } > The benefits of having java functions are > 1. Better code writing support from IDE > 2. Breakpoint capability > Regards, > Vinay Agarwal -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.