Hi Hans,

Let me elaborate on the problem I have.

For a customer I have to expand the processing of project time entries so
that they can do bulk processing of multiple time entries on multiple
projects.

In current setup of processing all is done with screen <screen name
="projectBilling"> in ProjectScreens.xml and forms <form
name="hoursNotYetBilled"> and <form name="AddProjectTimeToNewInvoice">, but
before the forms are rendered groovy code <script
location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/ProjectBilling.groovy"/>
is executed for the individual project, setting the invoice object and
parameters like partyIdFrom, partyId and invoicdeId.

In the bulkprocessing this must also occur, but the groovy code for the
individual project has the break to excape from the iteration of the
entryItems after the frist invoice with status "INVOICE_IN_PROCESS" has been
found.

So I need to recreate that groovy process in the simple method as well. Or
am I mistaken and chasing the wrong ball?

Regards,

Pierre

2011/6/22 Hans Bakker <mailingl...@antwebsystems.com>

> Hi Pierre,
>
> I assume you generated the list from the database?
> why not use <entity-condition with the condition you want to search on?
>
> regards,
> Hans
>
> On Wed, 2011-06-22 at 11:04 +0200, Pierre Smits wrote:
> > Hi all,
> >
> > I am stumped... I need to iterate through a list to find the the first
> entry
> > given a set of parameters in a simple-method, but how do I escape from
> the
> > iteration after having found the entry?
> >
> > I know that in groovy I can do a while loop and if I have found the entry
> I
> > can issue a 'break; and close the iteration. But how do I do this in the
> > interation in a simple-method?
> >
> > Regards,
> >
> > Pierre
>
> --
> Ofbiz on twitter: http://twitter.com/apache_ofbiz
> Myself on twitter: http://twitter.com/hansbak
> Antwebsystems.com: Quality services for competitive rates.
>
>

Reply via email to