Garry Saddington wrote:
Nicolas Gouzy wrote:

I think this code works :

<select name="groupabbrev">
<dtml-in getpastoralgroups>
<option value="<dtml-var expr="_['sequence-item']">" <dtml-if
expr="groupabbrev==_['sequence-item']"> selected</dtml-if> ><dtml-var
expr="_['sequence-item']"></option>
</dtml-in>
</select>

--
Nicolas Gouzy
[EMAIL PROTECTED]


This producing the following result, is this what it should do?
<select name="groupabbrev">
<option value="<Shared.DC.ZRDB.Results.r object at 0x43aa7c0c>"><Shared.DC.ZRDB.Results.r object at 0x43aa7c0c></option> <option value="<Shared.DC.ZRDB.Results.r object at 0x43f95824>"><Shared.DC.ZRDB.Results.r object at 0x43f95824></option> <option value="<Shared.DC.ZRDB.Results.r object at 0x43aa7c0c>"><Shared.DC.ZRDB.Results.r object at 0x43aa7c0c></option> <option value="<Shared.DC.ZRDB.Results.r object at 0x43f95824>"><Shared.DC.ZRDB.Results.r object at 0x43f95824></option>
</select>

Like I said: be careful about what comes out of getpastoralgroups.

These are Result objects, not strings. Like any result objects, they store data in attributes with the same name as the row that came out of the SQL results.

You must use a row in your comparison: a Result object can never be equal to a string.

                --jcc
--
"Building Websites with Plone"
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.com
_______________________________________________
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 )

Reply via email to