[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>&nbsp;</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>&lt;table tal:define=3D"results&nbsp;=20
list_clients;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;</FONT><FONT face=3DArial size=3D2>div tal:repeat=3D"result batch"=20
&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&lt;td&gt;&lt;a href=3D"zpt" =
tal:attributes=3D"href=20
python:here.pset_delclient(txtId=3Dresult.id,haction=3D'del');"&gt;Delete=
&lt;/a&gt;&lt;/td&gt;#pset_delclient&nbsp;=20
is&nbsp; #the pythonscript&nbsp; that needs&nbsp;two  parameters to be =
passed=20
called&nbsp; txtId and haction.</FONT></DIV>
<DIV>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I&nbsp;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&nbsp;parameters in =
anyway i get an=20
error on haction also :</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>John Kunchandy</FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0084_01C237B1.FDB0B2B0--