I have a table generated from a database that I want to be able to sort by different criteria by clicking on the column headers and reloading the page, however I have tried various syntaxes for the <dtml-in selectAllProjects sort=....> line, and although the table rows are shifted around it doesn't seem to follo any logic. Could someone explain the correct syntax to me please? I tried : <dtml-in selectAllProjects sort='<dtml-var sortby missing="">'> also tried doing a <dtml-call "REQUEST.set('sortby', sortby)"> with <dtml-in selectAllProjects sort=sortby> but have probably got the REQUEST.set stuff wrong too. Here's the table <table border="1" width="100%"> <tr> <td><a href="BE?sortby=responsible">Responsible</a></td> <td><a href="BE?sortby=beamline">BL#</a></td> <td><a href="BE?sortby=project_title">Title</a></td> <td><a href="BE?sortby=project_description">Description</a></td> <td><a href="BE?sortby=status">Status</a></td> <td><a href="BE?sortby=installdate">Install date</a></td> <td><a href="BE?sortby=updated">Updated on</a></td> </tr> <dtml-in selectAllProjects sort=????> <tr> <td><dtml-var responsible></td> <td><dtml-var beamline></td> TIA Marie Robichon Web Task Force European Synchrotron Radiation Facility BP 220 38043 Grenoble Cedex France http://www.esrf.fr Tel: (33) 04 76 88 21 86 Fax: (33) 04 76 88 24 27
Marie Robichon wrote:
I have a table generated from a database that I want to be able to sort by different criteria by clicking on the column headers and reloading the page, however I have tried various syntaxes for the <dtml-in selectAllProjects sort=....> line
[...] sort will sort the list by a given (fixed) attribute, you should use sort_expr instead: <dtml-in selectAllProjects sort_expr="sortby"> <tr>.... HTH -- //// (@ @) ---------------------------oOO----(_)----OOo------------------------ Los pecados de los tres mundos desapareceran conmigo. Alexis Roda - Universitat Rovira i Virgili - Reus, Tarragona (Spain) --------------------------------------------------------------------
http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AdvDTML.stx Near the bottom of the page there is an example that shows how to do what you need. Marie Robichon wrote:
I have a table generated from a database that I want to be able to sort by different criteria by clicking on the column headers and reloading the page, however I have tried various syntaxes for the <dtml-in selectAllProjects sort=....> line, and although the table rows are shifted around it doesn't seem to follo any logic. Could someone explain the correct syntax to me please?
I tried :
<dtml-in selectAllProjects sort='<dtml-var sortby missing="">'>
also tried doing a <dtml-call "REQUEST.set('sortby', sortby)"> with <dtml-in selectAllProjects sort=sortby> but have probably got the REQUEST.set stuff wrong too.
Here's the table
<table border="1" width="100%"> <tr> <td><a href="BE?sortby=responsible">Responsible</a></td> <td><a href="BE?sortby=beamline">BL#</a></td> <td><a href="BE?sortby=project_title">Title</a></td> <td><a href="BE?sortby=project_description">Description</a></td> <td><a href="BE?sortby=status">Status</a></td> <td><a href="BE?sortby=installdate">Install date</a></td> <td><a href="BE?sortby=updated">Updated on</a></td> </tr>
<dtml-in selectAllProjects sort=????> <tr> <td><dtml-var responsible></td> <td><dtml-var beamline></td>
TIA
Marie Robichon
Web Task Force European Synchrotron Radiation Facility BP 220 38043 Grenoble Cedex France
Tel: (33) 04 76 88 21 86 Fax: (33) 04 76 88 24 27
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Hello, On some browsers, eg MSIE 6, some of my images simply do not appear on the browser screen. ( Or sometimes they do and sometimes not.) The URLS to the image are hard-coded and do not use aquisition. That is, I use: <img scr="/Images/imageName"> rather than <img src="ImageName"> I mention this last point because I have seen references to aquisition/caching issues affecting image rendering. The images are GIF files. I am using Zope 2.6.1 So something is happening. I am hoping someone has seen this and can give me some tips. Thanks much, David
On Fri, 16 May 2003 11:54:18 -0700 GMT (..20:54 where i live(GMT+2) ) David Hassalevris asked the Zope mailinglist about the following: DH> On some browsers, eg MSIE 6, some of my images simply do not appear on the DH> browser screen. ( Or sometimes they do and sometimes not.) DH> The URLS to the image are hard-coded and do not use aquisition. That is, I DH> use: DH> <img scr="/Images/imageName"> rather than DH> <img src="ImageName"> DH> I mention this last point because I have seen references to DH> aquisition/caching issues affecting image rendering. DH> The images are GIF files. I am using Zope 2.6.1 DH> So something is happening. I am hoping someone has seen this and can give DH> me some tips. I can confirm i have seen this behaviour on several occasions. - But i am sorry to say i have not investigated what makes it happen. It only seems to happen with small image files (typically gif-icons) that are displayed a lot. It sometimes happens to the ZMI icons. I have seen it happen from time to time on several versions of Zope. Could it in any way be related to this bug ? http://collector.zope.org/Zope/544 small tip: When starting a new subject, please do not reply to a message concerning something else. For people who use mail-clients with proper threading, your message will be hidden deep down in the middle of another discussion. - much better to just make a new message to zope@zope.org -- Geir Bækholt
David Hassalevris wrote at 2003-5-16 11:54 -0700:
On some browsers, eg MSIE 6, some of my images simply do not appear on the browser screen. ( Or sometimes they do and sometimes not.)
The URLS to the image are hard-coded and do not use aquisition. That is, I use: <img scr="/Images/imageName"> rather than <img src="ImageName"> I mention this last point because I have seen references to aquisition/caching issues affecting image rendering.
The images are GIF files. I am using Zope 2.6.1
So something is happening. I am hoping someone has seen this and can give me some tips.
I have seen this when Zope has run out of file descriptors. Dieter
On Sunday 18 May 2003 02:12 pm, Dieter Maurer wrote:
David Hassalevris wrote at 2003-5-16 11:54 -0700:
The URLS to the image are hard-coded and do not use aquisition. That is, I use: <img scr="/Images/imageName"> rather than <img src="ImageName"> I mention this last point because I have seen references to aquisition/caching issues affecting image rendering.
The images are GIF files. I am using Zope 2.6.1
So something is happening. I am hoping someone has seen this and can give me some tips.
I have seen this when Zope has run out of file descriptors.
Interesting. I have seen ImageFile() images (these are taken from the filesystem and not from the ZODB, and are I think just like the ones used in Zope's management interface) which did not work on a FreeBSD server despite working perfectly on Linux. Changing these to Image() objects -- stored in the ZODB -- solved the problem. That would seem to confirm the file- descriptor idea, *if* FreeBSD somehow has more limited file descriptors. This was also a "fakeroot jail" system. Is it possible that the file descriptors would be limited for the whole system rather than for each jail? Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
Terry Hancock wrote at 2003-5-18 19:46 -0700:
On Sunday 18 May 2003 02:12 pm, Dieter Maurer wrote:
David Hassalevris wrote at 2003-5-16 11:54 -0700:
The URLS to the image are hard-coded and do not use aquisition. That is, I use: <img scr="/Images/imageName"> rather than <img src="ImageName"> I mention this last point because I have seen references to aquisition/caching issues affecting image rendering.
The images are GIF files. I am using Zope 2.6.1
So something is happening. I am hoping someone has seen this and can give me some tips.
I have seen this when Zope has run out of file descriptors.
Interesting. I have seen ImageFile() images (these are taken from the filesystem and not from the ZODB, and are I think just like the ones used in Zope's management interface) which did not work on a FreeBSD server despite working perfectly on Linux.
The default number of file descriptors is often 64 (which is quite low). There is a command which can be used to increase the limit. Its name depends on the shell used. For Bourne shell and derivatives, it is "ulimit". Dieter
participants (7)
-
Alexis Roda -
David Hassalevris -
Dieter Maurer -
Geir Bækholt -
Kevin Carlson -
Marie Robichon -
Terry Hancock