67 raise |
67 raise |
68 obj = self.select(__fallback_oid, req, **kwargs) |
68 obj = self.select(__fallback_oid, req, **kwargs) |
69 return obj.render(**kwargs) |
69 return obj.render(**kwargs) |
70 |
70 |
71 def select_vobject(self, oid, *args, **kwargs): |
71 def select_vobject(self, oid, *args, **kwargs): |
72 selected = self.select_object(oid, *args, **kwargs) |
72 selected = self.select_or_none(oid, *args, **kwargs) |
73 if selected and selected.propval('visible'): |
73 if selected and selected.propval('visible'): |
74 return selected |
74 return selected |
75 return None |
75 return None |
76 |
76 |
77 def possible_vobjects(self, *args, **kwargs): |
77 def possible_vobjects(self, *args, **kwargs): |
387 |
387 |
388 @deprecated('use vreg["actions"].possible_actions(*args, **kwargs)') |
388 @deprecated('use vreg["actions"].possible_actions(*args, **kwargs)') |
389 def possible_actions(self, req, rset=None, **kwargs): |
389 def possible_actions(self, req, rset=None, **kwargs): |
390 return self["actions"].possible_actions(req, rest=rset, **kwargs) |
390 return self["actions"].possible_actions(req, rest=rset, **kwargs) |
391 |
391 |
392 @deprecated("use vreg['boxes'].select_object(...)") |
392 @deprecated("use vreg['boxes'].select_or_none(...)") |
393 def select_box(self, oid, *args, **kwargs): |
393 def select_box(self, oid, *args, **kwargs): |
394 return self['boxes'].select_object(oid, *args, **kwargs) |
394 return self['boxes'].select_or_none(oid, *args, **kwargs) |
395 |
395 |
396 @deprecated("use vreg['components'].select_object(...)") |
396 @deprecated("use vreg['components'].select_or_none(...)") |
397 def select_component(self, cid, *args, **kwargs): |
397 def select_component(self, cid, *args, **kwargs): |
398 return self['components'].select_object(cid, *args, **kwargs) |
398 return self['components'].select_or_none(cid, *args, **kwargs) |
399 |
399 |
400 @deprecated("use vreg['actions'].select_object(...)") |
400 @deprecated("use vreg['actions'].select_or_none(...)") |
401 def select_action(self, oid, *args, **kwargs): |
401 def select_action(self, oid, *args, **kwargs): |
402 return self['actions'].select_object(oid, *args, **kwargs) |
402 return self['actions'].select_or_none(oid, *args, **kwargs) |
403 |
403 |
404 @deprecated("use vreg['views'].select(...)") |
404 @deprecated("use vreg['views'].select(...)") |
405 def select_view(self, __vid, req, rset=None, **kwargs): |
405 def select_view(self, __vid, req, rset=None, **kwargs): |
406 return self['views'].select(__vid, req, rset=rset, **kwargs) |
406 return self['views'].select(__vid, req, rset=rset, **kwargs) |
407 |
407 |