Re: [Zope] boolean property bug
On Mon, 31 Jul 2000, Jonothan Farr wrote: > You should submit this to the collector, preferable with a patch! ;) > Otherwise it's likely to get lost in the chaos of the list. > > http://classic.zope.org:8080/Collector So I did it. (Collector #1495) You can patch your Zope on your own by replacing some code in file lib/python/OFS/PropertySheets.py. In class PropertySheet, change method manage_editProperties to this: def manage_editProperties(self, REQUEST): """Edit object properties via the web.""" for prop in self.propertyMap(): name=prop['id'] value=REQUEST.get(name, '') self._updateProperty(name, value) return MessageDialog( title ='Success!', message='Your changes have been saved', action ='manage') It works for me, hope it helps. ololo ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] boolean property bug
You should submit this to the collector, preferable with a patch! ;) Otherwise it's likely to get lost in the chaos of the list. http://classic.zope.org:8080/Collector --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 - Original Message - From: Aleksander Salwa <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 31, 2000 11:02 AM Subject: Re: [Zope] boolean property bug > > On Mon, 31 Jul 2000, I wrote: > > > > Probably I found a bug in handling boolean properties in Zope 2.2.0. > > I can only set them "on", and then can't turn "off". I can have default > > value "off" (in ZClass definition), but after first switch to "true", > > it can't be changed. > > It only refers to handling properties via Zope's management screens. > > API functions manage_changeProperty, manage_editProperty work fine, so > > maybe it's an error in generated HTML forms, or in processing of these > > forms. > > I've located this bug, I think. > It's in file 'lib/python/OFS/PropertySheets.py' in method > 'manage_editProperties'. This method should change all properties, even > those not included in REQUEST. But there are handled only properties > included in REQUEST, so checkboxes that get turned off are ignored. > > > ololo > > > ___ > Zope maillist - [EMAIL PROTECTED] > 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 ) > ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] boolean property bug
On Mon, 31 Jul 2000, I wrote: > > Probably I found a bug in handling boolean properties in Zope 2.2.0. > I can only set them "on", and then can't turn "off". I can have default > value "off" (in ZClass definition), but after first switch to "true", > it can't be changed. > It only refers to handling properties via Zope's management screens. > API functions manage_changeProperty, manage_editProperty work fine, so > maybe it's an error in generated HTML forms, or in processing of these > forms. I've located this bug, I think. It's in file 'lib/python/OFS/PropertySheets.py' in method 'manage_editProperties'. This method should change all properties, even those not included in REQUEST. But there are handled only properties included in REQUEST, so checkboxes that get turned off are ignored. ololo ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] boolean property bug
Probably I found a bug in handling boolean properties in Zope 2.2.0. I can only set them "on", and then can't turn "off". I can have default value "off" (in ZClass definition), but after first switch to "true", it can't be changed. It only refers to handling properties via Zope's management screens. API functions manage_changeProperty, manage_editProperty work fine, so maybe it's an error in generated HTML forms, or in processing of these forms. ololo ___ Zope maillist - [EMAIL PROTECTED] 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 )