robert
here an action I use
@kssaction
def doctorSearchFillbody(self):
ksscore = self.getCommandSet('core')
html = self.template()
tinfo = """
<div id="praxis_list_body" name="praxis_list_body">
<table with="100%%">
<tr>
<th width="100" />
<th width="150" />
<th width="65" />
<th />
</tr>
%s
</table>
</div>
"""
if isIE(self.request):
ksscore.replaceHTML('#praxis_list_body', tinfo % html.strip())
else:
ksscore.replaceInnerHTML('#praxis_list_body', html.strip())
and this is the template that is used (the important thing is
view.getDoctorsList() which return a list of records you want to display)
<table width="100%" border="0" cellspacing="0" cellpadding="3"
style="margin-bottom: 10px">
<tr>
<th width="80" />
<th width="200" />
<th width="30" />
<th />
</tr>
<form id="doctors_edit" name="doctors_edit" >
<tal:block repeat="person python:view.getDoctorsList()">
<tal:block define="surgery python:person.companies and
person.companies[0] or ''">
<tal:block condition="surgery">
<tr tal:define="
mayedit python:person.mayedit;
oddrow repeat/person/odd;
name python:'%s %s %s %s' % (person.greeting,
person.academic_title, person.firstname, person.lastname)"
tal:attributes="class python:oddrow and 'even' or 'odd'">
<td colspan="3" tal:define="cid python:person.id"
width="310" valign="top">
<!-- name: -->
<a tal:attributes="href name;
onClick
python:'set_hidden_value_and_hide_previous_form(\'%s\', \'doctor\')' % cid;"
tal:content="name"
class="doctor_show_edit_container" />
<span tal:condition="not:mayedit" tal:content="name" />
<br>
</td>
<td valign="top">
<!-- Adresse: -->
<span tal:content="python:surgery and
surgery.address" />
<span tal:content="python:' / ' + (person and
surgery.zip or '')" />
<span tal:content="python:surgery and surgery.city"
/><br>
<b>Tel: </b><span tal:content="python:surgery and
surgery.phone" /><br>
</td>
</tr>
<tal:block define="oddrow repeat/person/odd">
<tr tal:attributes="class python:oddrow and 'even' or
'odd'">
<tal:block define="n
python:'doctor_edit_container_%s' % person.id">
<td colspan="5">
<div tal:attributes="name n;id n"></div>
</td>
</tal:block>
</tr>
</tal:block>
</tal:block>
</tal:block>
</tal:block>
</form>
</table>
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Plone-Users mailing list
Plone...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
Thanks a lot. I have used your idea and is planning to generate the HTML
from the template file
Thanks,