Author: eallen
Date: 2010-07-08 09:03:08 -0400 (Thu, 08 Jul 2010)
New Revision: 4089
Modified:
mgmt/newdata/cumin/python/cumin/objecttask.py
Log:
Added way to override item name that gets displayed in the SelectionForm
Modified: mgmt/newdata/cumin/python/cumin/objecttask.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/objecttask.py 2010-07-08 12:32:04 UTC (rev 4088)
+++ mgmt/newdata/cumin/python/cumin/objecttask.py 2010-07-08 13:03:08 UTC (rev 4089)
@@ -306,6 +306,9 @@
def do_invoke(self, invoc, item, *args):
pass
+ def get_item_content(self, session, item):
+ return item.name
+
class TaskForm(FoldingFieldSubmitForm):
def __init__(self, app, name, task):
assert isinstance(task, Task)
@@ -398,7 +401,7 @@
return self.parent.selection.get(session)
def render_item_content(self, session, item):
- return item.name
+ return self.parent.task.get_item_content(session, item)
def render_item_class(self, session, item):
return "item"