On Wed, 2005-01-26 at 19:23, Brent Johnson wrote:
> I've run into this error before. This usually means that some
> function used is a Javascript builtin function (or statement). So
> odds are, either add() or eq() are functions or statements in
> Javascript.
>
> I ran into this problem with a Java method I called delete(). So I'm
> guessing that your add() call is the problem. Change the call to
> something like this and see if it works:
>
> criteria["add"](Expression.eq("status", "UNCONFIRMED"));
IMHO, it is bad design to access persistence direct from flow.
I would prefer a command class (J2EE command pattern) which has several
getters and setters and an exceute method. That command class exceutes
the persistence calls. The result, if any, is available via the getters.
This would also enable you to use the wrapped business logic in other
web app frameworks than cocoon.
var myCommand = new MyCommand();
myCommand.setParam1(something);
myCommand.set*(*);
myCommand.execute();
var someResult = myCommand.getResultProp1();
Do not misuse flow :)
--
Rolf Kulemann
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]