Hi All,
Attached is a tiny patch which fixes a small bug in the esql taglib
supplied with Cocoon 2 CVS.
The problem is to do with the generated code when one uses the
esql:statement tag with no parameters, or with more than one
parameter.
The bug has to do with setting the parameters on the preparedStatement
object (line 288). With no parameters (the case that I found) the
generated code looks like:
_esql_session.prepared_statement. _esql_session.has_resultset =
_esql_session.prepared_statement.execute();
(yes, the space causes the compile error, but I presume the first
_esql_session shouldn't be there at all).
With more than one parameter the generated code would concatenats a
heap of preparedStatement.setXXX methods which all return void
(ie. can't be cascaded).
The patch moves the first _esql_... inside the for-each loop which I
think was intended (Donald - hope I've got this right ? :-) )
Cheers,
Marcus
--
.....
,,$$$$$$$$$, Marcus Crafter
;$' '$$$$: Computer Systems Engineer
$: $$$$: Open Software Associates GmbH
$ o_)$$$: 82-84 Mainzer Landstrasse
;$, _/\ &&:' 60327 Frankfurt Germany
' /( &&&
\_&&&&' Email : Marcus.Crafter@osa.de
&&&&. Business Hours : +49 69 9757 200
&&&&&&&: After Hours : +49 69 49086750
|