[gen] Ref field: more work on global actions.

This commit is contained in:
Gaetan Delannay 2014-04-05 09:49:54 +02:00
parent 09b0ed5121
commit b9bfee9615
10 changed files with 89 additions and 38 deletions

View file

@ -685,6 +685,13 @@ class Field:
obj.log(sutils.Traceback.get(), type='error')
raise e
def getAttribute(self, obj, name):
'''Gets the value of attribue p_name on p_self, which can be a simple
value or the result of a method call on p_obj.'''
res = getattr(self, name)
if not callable(res): return res
return self.callMethod(obj, res)
def process(self, obj):
'''This method is a general hook allowing a field to perform some
processing after an URL on an object has been called, of the form