dynamic table
Graziella Toutoungis <[email protected]> Mon, 5 Feb 2007 08:28:12 +0000 (GMT)
| Newsgroups | gmane.comp.web.zope.page-templates |
|---|---|
| Message-ID | <[email protected]> |
--===============1079244167==
Content-Type: multipart/alternative; boundary="0-1834116458-1170664092=:61858"
--0-1834116458-1170664092=:61858
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Hello,=0A=0AI want to create a page template who provide a dynamic table, =
=0Ain the first step my user can choose his table from a list (the first pa=
ge template) when he validates his choice he can see another page template =
whith his table.=0Ain the second step he can create his own table by select=
ing the rows and columns.=0A=0AI create a script python for yeilding the co=
lumn name of the original table in a list like getColumnName() =3D>[('id')=
,('title'),('address')]=0Aand the data like getColumnData =3D> [(1,), ('vi=
ncent ',), (1233,), (2,), =0A('nicolas ',), (2222,), =0A(3,), ('nani =
',), (3333,), =0A(4,), ('roby ',), (4444,), =0A(5,), ('aaaa ',=
), (7777,), (6,), =0A('bbbb ',), (8888,), (7,), =0A('cccc ',), (9=
999,), (8,), =0A('dddd ',), (1414,), (9,), =0A('eeeee ',), (17484,=
), (10,), =0A('eeeee ',), (17484,), (11,), =0A('eeeee ',), (17484,)=
, (12,)]=0A=0Anow in my the zpt =0A=0A<tr>=0A <th></th>=0A =
=0A <div tal:define=3D"results context/columnName" tal:repeat=3D"re=
sults python:here.getColumnName()">=0A =0A <sp=
an tal:condition=3D"results"></span>=0A <th><input type=
=3D"checkbox" id=3D"selectedColumn" /></th>=0A </div>=0A </tr>=
=0A =0A <tr bgcolor=3D"#ece9d8">=0A <th></th>=0A <th ta=
l:repeat=3D"col_name python:here.getColumnName()"> =0A <span tal:repl=
ace=3D"col_name"/>=0A </th> =0A </tr>=0A =0A <tr align=3D"right"=
bgcolor=3D"#ffffff" tal:repeat=3D"item batch" >=0A <td bgcolor=3D"#=
ece9d8" length=3D"0.5" ><input type=3D"checkbox" id=3D"selectedRow"/></td>=
=0A =0Ahere i want to put the data =0A=0A </td>=0A =
=0A </tr> =0A =0A=0AMy question how i can fill my grid table with the =
data (by using my script python).?=0AWhen the user select the rows and colu=
ms how i can obtain the cell choosed for create the new table?=0A=0Athanks =
for all suggestions=0A G.=0A=0A=0A=0A=0A=0A=09=0A=0A=09=0A=09=09=0A_____=
______________________________________________________________________ =0AD=
=E9couvrez une nouvelle fa=E7on d'obtenir des r=E9ponses =E0 toutes vos que=
stions ! =0AProfitez des connaissances, des opinions et des exp=E9riences d=
es internautes sur Yahoo! Questions/R=E9ponses =0Ahttp://fr.answers.yahoo.c=
om
--0-1834116458-1170664092=:61858
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<html><head><style type=3D"text/css"><!-- DIV {margin:0px;} --></style></he=
ad><body><div style=3D"font-family:times new roman, new york, times, serif;=
font-size:12pt"><div>Hello,<br><br>I want to create a page template who pro=
vide a dynamic table, <br>in the first step my user can choose his table fr=
om a list (the first page template) when he validates his choice he can see=
another page template whith his table.<br>in the second step he can create=
his own table by selecting the rows and columns.<br><br>I create a script =
python for yeilding the column name of the original table in a list like ge=
tColumnName() =3D>[('id'),('title'),('address')]<br>and the data l=
ike getColumnData =3D> [(1,), ('vincent ',), (1233,), =
(2,), <br>('nicolas ',), (2222,), <br>(3,), ('nani &=
nbsp; ',), (3333,), <br>(4,), ('roby &nb=
sp; ',), (4444,), <br>(5,), ('aaaa ',), (7777=
,), (6,),
<br>('bbbb ',), (8888,), (7,), <br>('cccc&nb=
sp; ',), (9999,), (8,), <br>('dddd  =
; ',), (1414,), (9,), <br>('eeeee ',), =
(17484,), (10,), <br>('eeeee ',), (17484,), (11,), =
<br>('eeeee ',), (17484,), (12,)]<br><br>now in my =
the zpt <br><br><tr><br> &nb=
sp; <th></th><br> &nbs=
p; <br> <div tal:define=
=3D"results context/columnName" tal:repeat=3D"results python:here.getColumn=
Name()"><br> =
<br> &nbs=
p; <span
tal:condition=3D"results"></span><br> &nbs=
p; &=
nbsp; <th><input type=3D"checkbox" id=3D"selectedColum=
n" /></th><br> &nbs=
p; </div><br> </tr><br> &nbs=
p; <br> <tr bgcolor=3D"#ece9d8"><br>&nb=
sp; <th></th><br> &nbs=
p; <th tal:repeat=3D"col_name python:here.getColumnNam=
e()"> <br> <span tal:replace=3D"c=
ol_name"/><br> </th> <br>  =
; </tr><br> <br> <tr align=3D"right" =
bgcolor=3D"#ffffff" tal:repeat=3D"item batch" ><br> &nb=
sp; <td bgcolor=3D"#ece9d8" length=3D"0.5" ><inp=
ut type=3D"checkbox"
id=3D"selectedRow"/></td><br> =
<br>here i want to put the data <br><br> &nbs=
p; </td><br> &nb=
sp; <br> </tr> <br> <br><br>My question=
how i can fill my grid table with the data (by using my script python).?<b=
r>When the user select the rows and colums how i can obtain the cell choose=
d for create the new table?<br><br>thanks for all suggestions<br> &nbs=
p; G.<br><br></div></div><br>=0A=09=09<hr size=3D"1"> =0AD=E9couvrez =
une nouvelle fa=E7on d'obtenir des r=E9ponses =E0 toutes vos questions ! =
=0AProfitez des connaissances, des opinions et des exp=E9riences des intern=
autes sur <a href=3D"http://fr.rd.yahoo.com/evt=3D42054/*http://fr.answers.=
yahoo.com">Yahoo! Questions/R=E9ponses</a>.</body></html>
--0-1834116458-1170664092=:61858--
--===============1079244167==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ZPT mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zpt
--===============1079244167==--