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()&nbsp; =3D&gt;[('id'),('title'),('address')]<br>and the data l=
ike&nbsp; getColumnData =3D&gt; [(1,), ('vincent&nbsp;&nbsp; ',), (1233,), =
(2,), <br>('nicolas&nbsp;&nbsp; ',), (2222,), <br>(3,), ('nani&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp; ',), (3333,), <br>(4,), ('roby&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; ',), (4444,), <br>(5,), ('aaaa&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ',), (7777=
,), (6,),
 <br>('bbbb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ',), (8888,), (7,), <br>('cccc&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp; ',), (9999,), (8,), <br>('dddd&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; ',), (1414,), (9,), <br>('eeeee&nbsp;&nbsp;&nbsp;&nbsp; ',), =
(17484,), (10,), <br>('eeeee&nbsp;&nbsp;&nbsp;&nbsp; ',), (17484,), (11,), =
<br>('eeeee&nbsp;&nbsp;&nbsp;&nbsp; ',), (17484,), (12,)]<br><br>now in my =
the zpt <br><br>&lt;tr&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; &lt;th&gt;&lt;/th&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div tal:define=
=3D"results context/columnName" tal:repeat=3D"results python:here.getColumn=
Name()"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;span
 tal:condition=3D"results"&gt;&lt;/span&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp; &lt;th&gt;&lt;input type=3D"checkbox" id=3D"selectedColum=
n" /&gt;&lt;/th&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; &lt;/div&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>&nbsp;&nbsp;&nbs=
p;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;tr bgcolor=3D"#ece9d8"&gt;<br>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;th&gt;&lt;/th&gt;<br>&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp; &lt;th tal:repeat=3D"col_name python:here.getColumnNam=
e()"&gt; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;span tal:replace=3D"c=
ol_name"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/th&gt; <br>&nbsp;&nbsp;&nbsp=
;&nbsp; &lt;/tr&gt;<br>&nbsp;<br>&nbsp;&nbsp;&nbsp; &lt;tr align=3D"right" =
bgcolor=3D"#ffffff" tal:repeat=3D"item batch" &gt;<br>&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; &lt;td bgcolor=3D"#ece9d8" length=3D"0.5" &gt;&lt;inp=
ut type=3D"checkbox"
 id=3D"selectedRow"/&gt;&lt;/td&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp; <br>here i want to&nbsp; put&nbsp; the data <br><br>&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/td&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; <br>&nbsp;&nbsp;&nbsp; &lt;/tr&gt; <br>&nbsp;&nbsp; <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>&nbsp;&nbs=
p;&nbsp; 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==--