[Zope] RE: looping and checkboxes
Laurie Nason
laurien@tiger.3dem.bioch.bcm.tmc.edu
Thu, 12 Jul 2001 09:47:45 -0500
The way that I would do this would be to have 2 loops - unless you have
extremely large lists of items
<dtml-in "a liste">
<input type=checkbox name=connect value="<dtml-var sequence-item>"
<dtml-call expr="REQUEST.set(mylistitem,_['sequence-item'])">
<dtml-in connection>
<dtml-if expr="_['sequence-item'] == mylistitem">
checked
</dtml-if>>
</dtml-in>
<dtml-var sequence-item><br>
</dtml-in>
This isn't tested but should work!?
Laurie
PS Always try to put an informative title on your emails to the list!!!
-----Original Message-----
From: Benoit DOMINIAK [mailto:koubonline@hotmail.com]
Sent: Thursday, July 12, 2001 9:26 AM
To: laurien@tiger.3dem.bioch.bcm.tmc.edu
Cc: zope@zope.org
Subject:
Thank you but it will be difficul : here is my code for a form where the
good box must be checked,
<dtml-in "a liste">
<input type=checkbox name=connect value="<dtml-var sequence-item>"
<dtml-if "_['sequence-item'] in connection">
checked
</dtml-if>>
<dtml-var sequence-item><br>
</dtml-in>
How can I do, because this doesn't work.
-----Original Message-----
From: Laurie Nason [mailto:laurien@tiger.3dem.bioch.bcm.tmc.edu]
Sent: jeudi 12 juillet 2001 15:17
To: benoit.dominiak@makinacorpus.com
Subject: RE: [Zope] Multiple selection property and Zcatalog
To get the value of one of the items in your list simply use
<dtml-in connection>
<dtml-var sequence-item>
</dtml-in>
Should work for you!
Can't help with the ZCatalog bit yet - still working on it myself!
hth
Laurie #B-}
-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
Benoit DOMINIAK
Sent: Thursday, July 12, 2001 8:04 AM
To: zope@zope.org
Subject: [Zope] Multiple selection property and Zcatalog
Hi,
I did a Zclass which has a property called "connection" which I want to be a
multiple selection property.
How can I access to the value of this property ?
If I put <dtml-var connection> I get a list but I can't access to one of the
item of the list in particular. I tryed connection[1]... but I only get a
char : connection is a string !!!
How to index this property in a Zcatalog ?
I want to be able to find an instance by quering on one item of this
property.
PLEASE HELP...
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
_______________________________________________
Zope maillist - Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.