[Zope] Is this a bug with multiple selection lists?

Michael Halle halazar@media.mit.edu
Tue, 15 Feb 2000 10:23:38 -0500


This problem *isn't* fixed in the latest release.  Here's a patch to
fix it (I submitted it to the Collector).  

In addition, if you render your own multiple selection lists, you need
to check to make sure the value of your property isn't None when
deciding what to select.


						Michael Halle
						mhalle@media.mit.edu



*** lib/python/OFS/properties.dtml.dist	Tue Feb 15 10:12:37 2000
--- lib/python/OFS/properties.dtml	Tue Feb 15 10:12:44 2000
***************
*** 87,93 ****
        size="<dtml-var "_.min(7, _.len(_[select_variable]))">">
        <dtml-in "_[select_variable]">
           <option<dtml-if 
!          "_['sequence-item'] in getProperty(id)"> SELECTED</dtml-if
           >><dtml-var sequence-item html_quote></option>
        </dtml-in>
      </select>
--- 87,93 ----
        size="<dtml-var "_.min(7, _.len(_[select_variable]))">">
        <dtml-in "_[select_variable]">
           <option<dtml-if 
!          "getProperty(id) and (_['sequence-item'] in getProperty(id))"> SELECTED</dtml-if
           >><dtml-var sequence-item html_quote></option>
        </dtml-in>
      </select>