Package ZenModel :: Module ConfmonPropManager
[hide private]
[frames] | no frames]

Source Code for Module ZenModel.ConfmonPropManager

 1  ########################################################################### 
 2  # 
 3  # This program is part of Zenoss Core, an open source monitoring platform. 
 4  # Copyright (C) 2007, Zenoss Inc. 
 5  # 
 6  # This program is free software; you can redistribute it and/or modify it 
 7  # under the terms of the GNU General Public License version 2 as published by 
 8  # the Free Software Foundation. 
 9  # 
10  # For complete information please visit: http://www.zenoss.com/oss/ 
11  # 
12  ########################################################################### 
13   
14  __doc__="""ConfonPropManager 
15   
16  add keyedselect to property manager 
17   
18  $Id: ConfmonPropManager.py,v 1.4 2002/12/08 18:27:53 edahl Exp $""" 
19   
20  __version__ = "$Revision: 1.4 $"[11:-2] 
21   
22  from OFS.PropertyManager import PropertyManager 
23  from Globals import DTMLFile 
24  from Globals import InitializeClass 
25  from Acquisition import aq_base 
26   
27 -class ConfmonPropManager(PropertyManager):
28 29 manage_propertiesForm=DTMLFile('dtml/properties', globals(), 30 property_extensible_schema__=1) 31
32 - def _setPropValue(self, id, value):
33 """override from PerpertyManager to handle checks and ip creation""" 34 self._wrapperCheck(value) 35 if self.getPropertyType(id) == 'keyedselection': 36 value = int(value) 37 setattr(self,id,value)
38 39
40 - def manage_editProperties(self, REQUEST):
41 """Edit object properties via the web. 42 The purpose of this method is to change all property values, 43 even those not listed in REQUEST; otherwise checkboxes that 44 get turned off will be ignored. Use manage_changeProperties() 45 instead for most situations. 46 """ 47 for prop in self._propertyMap(): 48 name=prop['id'] 49 if 'w' in prop.get('mode', 'wd'): 50 value=REQUEST.get(name, '') 51 self._updateProperty(name, value) 52 self.index_object() 53 if REQUEST: 54 message="Saved changes." 55 return self.manage_propertiesForm(self,REQUEST, 56 manage_tabs_message=message)
57 58 59 InitializeClass(ConfmonPropManager) 60