[Zope] Tal:attributes and passing parameters

Chris Beaven Chris@d-designz.co.nz
Tue, 30 Jul 2002 17:17:25 +1200


       <div tal:repeat="result batch" >
<td><a href="zpt" tal:attributes="href
python:here.pset_delclient(txtId=result.id,haction='del');">Delete</a></td>#
pset_delclient  is  #the pythonscript  that needs two parameters to be
passed called  txtId and haction.

I'm not completely sure that it's your problem but there shouldn't be a
semicolon after the python statement


-----Original Message-----
From: zope [mailto:zope@stylusinc.net]
Sent: Tuesday, 30 July 2002 4:45 p.m.
To: zope@zope.org
Subject: [Zope] Tal:attributes and passing parameters


Hi,

Thanks for the suggestions .I tired to use the suggested method to send the
parameter but i am getting an error
I tried
<table tal:define="results  list_clients;
                    start request/start|python:0;
                    batch python:modules['ZTUtils'].Batch(results,
                                                          size=5,
                                                          start=start)">
       
       <div tal:repeat="result batch" >
<td><a href="zpt" tal:attributes="href
python:here.pset_delclient(txtId=result.id,haction='del');">Delete</a></td>#
pset_delclient  is  #the pythonscript  that needs two parameters to be
passed called  txtId and haction.

If i send only one parameter txtId i get the error: 
Error Type: TALESError
Error Value: exceptions.KeyError on txtId in '',

I have tried also result/id,and result['id'](Are all these options possible
to get ?)
If i adjust the parameters in anyway i get an error on haction also :


Regards
John Kunchandy