calling compiled java via bsh in a form

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

calling compiled java via bsh in a form

Hans Bakker
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....

Reply | Threaded
Open this post in threaded view
|

Re: calling compiled java via bsh in a form

Adrian Crum
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....
>
Reply | Threaded
Open this post in threaded view
|

Re: calling compiled java via bsh in a form

hans_bakker
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