[Zope] Tal:attributes and passing parameters
zope
zope@stylusinc.net
Tue, 30 Jul 2002 10:15:12 +0530
This is a multi-part message in MIME format.
------=_NextPart_000_0084_01C237B1.FDB0B2B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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=3D"results list_clients;
start request/start|python:0;
batch python:modules['ZTUtils'].Batch(results,
size=3D5,
=
start=3Dstart)">
=20
<div tal:repeat=3D"result batch" >
<td><a href=3D"zpt" tal:attributes=3D"href =
python:here.pset_delclient(txtId=3Dresult.id,haction=3D'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:=20
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
=20
------=_NextPart_000_0084_01C237B1.FDB0B2B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for the suggestions .I tired to =
use the=20
suggested method to send the parameter but i am getting an =
error</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I tried</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><table tal:define=3D"results =20
list_clients;<BR> &n=
bsp; =20
start=20
request/start|python:0;<BR> &nbs=
p; =20
batch=20
python:modules['ZTUtils'].Batch(results,<BR>  =
; =
&=
nbsp; &n=
bsp; &nb=
sp; =20
size=3D5,<BR> =
&=
nbsp; &n=
bsp; &nb=
sp; =20
start=3Dstart)"><BR> <BR>&nbs=
p; =20
<</FONT><FONT face=3DArial size=3D2>div tal:repeat=3D"result batch"=20
></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><td><a href=3D"zpt" =
tal:attributes=3D"href=20
python:here.pset_delclient(txtId=3Dresult.id,haction=3D'del');">Delete=
</a></td>#pset_delclient =20
is #the pythonscript that needs two parameters to be =
passed=20
called txtId and haction.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>If i send only one parameter txtId i =
get the error:=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>Error Type:=20
TALESError</STRONG><BR><STRONG>Error Value: exceptions.KeyError on txtId =
in=20
'<PYTHONEXPR =
here.pset_delclient(txtId=3D"result.id)">',</STRONG></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I have tried also result/id,and=20
result['id'](Are all these options possible to get ?)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>If i adjust the parameters in =
anyway i get an=20
error on haction also :</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>John Kunchandy</FONT></DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_0084_01C237B1.FDB0B2B0--