Logo Search packages:      
Sourcecode: zope-managableindex version File versions  Download package

def ManagableIndex::ManagableIndex::ManagableIndex::addValueProvider (   self,
  id,
  type,
  RESPONSE = None 
)

add a value provider with *id* of *type*.

Definition at line 640 of file ManagableIndex.py.

00640                                                    :
    '''add a value provider with *id* of *type*.'''
    if type not in ('AttributeLookup', 'ExpressionEvaluator'):
      raise ValueError('unknown type')
    cl= _mdict[type]
    # try to avaid a name conflict
    eid= id
    if not id.endswith('_') and hasattr(aq_base(self),id): eid= id + '_'
    vp= cl(); vp.id= eid
    if id != eid and type == 'AttributeLookup': vp.Name= id
    self._setObject(eid, vp)
    vp= self._getOb(eid)
    if RESPONSE is None: return vp
    RESPONSE.redirect('%s/manage_workspace' % vp.absolute_url())

    
InitializeClass(ManagableIndex)


#################################################################


Generated by  Doxygen 1.6.0   Back to index