You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Hans Bakker <h....@antwebsystems.com> on 2009/01/05 07:33:02 UTC

calling compiled java via bsh in a form

Hi,

if i do this in a field:
       <field name="actualHours"
title="${uiLabelMap.ProjectMgrActualHours}"><display description="${bsh:
org.ofbiz.project.Various.calculateActualHours(delegator,
timesheetId);}"/></field>

i get the error: 
Error evaluating BSH scriptlet
[ org.ofbiz.project.Various.calculateActualHours(delegator,
timesheetId);], inserting nothing; error was: Field access:
bsh.ReflectError: No such field: locale : at Line: -1 : in file: <Called
from Java Code> : <Compiled Java Code>

if i do this (similar) in a row action:
           <set field="actualHours"
value="${bsh:org.ofbiz.project.Various.calculateActualHours(delegator,
timesheetId)}"/>

it works fine....

-- 
http://www.antwebsystems.com : 
Quality OFBiz support for competitive rates....


Re: calling compiled java via bsh in a form

Posted by Hans Bakker <ma...@antwebsystems.com>.
look at the changes i did at Revision: 731474 where i moved the java
calls from the form fields to the rowactions...

On Mon, 2009-01-05 at 08:33 -0800, Adrian Crum wrote:
> Hans,
> 
> Do you have a URL I can use to troubleshoot this?
> 
> -Adrian
> 
> Hans Bakker wrote:
> > Hi,
> > 
> > if i do this in a field:
> >        <field name="actualHours"
> > title="${uiLabelMap.ProjectMgrActualHours}"><display description="${bsh:
> > org.ofbiz.project.Various.calculateActualHours(delegator,
> > timesheetId);}"/></field>
> > 
> > i get the error: 
> > Error evaluating BSH scriptlet
> > [ org.ofbiz.project.Various.calculateActualHours(delegator,
> > timesheetId);], inserting nothing; error was: Field access:
> > bsh.ReflectError: No such field: locale : at Line: -1 : in file: <Called
> > from Java Code> : <Compiled Java Code>
> > 
> > if i do this (similar) in a row action:
> >            <set field="actualHours"
> > value="${bsh:org.ofbiz.project.Various.calculateActualHours(delegator,
> > timesheetId)}"/>
> > 
> > it works fine....
> > 
-- 
Antwebsystems.com: Quality OFBiz services for competitive prices


Re: calling compiled java via bsh in a form

Posted by Adrian Crum <ad...@hlmksw.com>.
Hans,

Do you have a URL I can use to troubleshoot this?

-Adrian

Hans Bakker wrote:
> Hi,
> 
> if i do this in a field:
>        <field name="actualHours"
> title="${uiLabelMap.ProjectMgrActualHours}"><display description="${bsh:
> org.ofbiz.project.Various.calculateActualHours(delegator,
> timesheetId);}"/></field>
> 
> i get the error: 
> Error evaluating BSH scriptlet
> [ org.ofbiz.project.Various.calculateActualHours(delegator,
> timesheetId);], inserting nothing; error was: Field access:
> bsh.ReflectError: No such field: locale : at Line: -1 : in file: <Called
> from Java Code> : <Compiled Java Code>
> 
> if i do this (similar) in a row action:
>            <set field="actualHours"
> value="${bsh:org.ofbiz.project.Various.calculateActualHours(delegator,
> timesheetId)}"/>
> 
> it works fine....
>