Hi all, I'm struggling with a problem in DTML for a day now and I'm ready to beg for someone to enlighten me. Problem: I want to call a Z SQL Method (say InsertFoo) from a DTML Method (say CallingInsertFoo) and it just won't work. The Z SQL Method takes three arguments, let's call them a_id, b_id and c_id. All three arguments are available to me in the calling DTML Method. I can print them in HTML. But when I call the query with <dtml-var InsertFoo> I get the following error: "Error Type: Bad Request Error Value: ['a_id', 'b_id', 'c_id']" I tried all sorts of things but I'm thinking I am missing something obvious. What am I doing wrong??? Greetings, BertJan Bakker
In your SQL method: <dtml-with REQUEST> select ... </dtml-with> ----- Original Message ----- From: Bert Jan Bakker <e.j.a.bakker@eccoo.rug.nl> To: <zope@zope.org> Sent: Wednesday, June 21, 2000 5:57 AM Subject: [Zope] Probably a simple name space question Hi all, I'm struggling with a problem in DTML for a day now and I'm ready to beg for someone to enlighten me. Problem: I want to call a Z SQL Method (say InsertFoo) from a DTML Method (say CallingInsertFoo) and it just won't work. The Z SQL Method takes three arguments, let's call them a_id, b_id and c_id. All three arguments are available to me in the calling DTML Method. I can print them in HTML. But when I call the query with <dtml-var InsertFoo> I get the following error: "Error Type: Bad Request Error Value: ['a_id', 'b_id', 'c_id']" I tried all sorts of things but I'm thinking I am missing something obvious. What am I doing wrong??? Greetings, BertJan Bakker _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
try: <dtml-call "InsertFoo(REQUEST)"> or <dtml-call "InsertFoo(a_id=a_id, b_id=b_id, c_id=c_id)"> assumming that a_id etc. are the names of the var 's in the zsql argument list I used dtml-call instaed of dtml-var, if you want to "render" something use dtml-var, if you just want to execute something use dtml-call Hope this helps. DR Jim Sanford wrote:
In your SQL method:
<dtml-with REQUEST> select ... </dtml-with>
----- Original Message ----- From: Bert Jan Bakker <e.j.a.bakker@eccoo.rug.nl> To: <zope@zope.org> Sent: Wednesday, June 21, 2000 5:57 AM Subject: [Zope] Probably a simple name space question
Hi all,
I'm struggling with a problem in DTML for a day now and I'm ready to beg for someone to enlighten me.
Problem:
I want to call a Z SQL Method (say InsertFoo) from a DTML Method (say CallingInsertFoo) and it just won't work.
The Z SQL Method takes three arguments, let's call them a_id, b_id and c_id.
All three arguments are available to me in the calling DTML Method. I can print them in HTML. But when I call the query with <dtml-var InsertFoo> I get the following error:
"Error Type: Bad Request Error Value: ['a_id', 'b_id', 'c_id']"
I tried all sorts of things but I'm thinking I am missing something obvious.
What am I doing wrong???
Greetings, BertJan Bakker
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Bert Jan Bakker -
Dan Rusch -
Jim Sanford