Commit 17f25fbf authored by Vincent Pelletier's avatar Vincent Pelletier

Do not use hardcoded listbox name to store validation result into request.

Add getPhysicalPath on renderer base class to make ZopeProfiler happy.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9941 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6a1820de
......@@ -442,6 +442,14 @@ class ListBoxRenderer:
if isinstance(v, VolatileCachingMethod):
setattr(self, k, InstanceMethod(self, v))
def getPhysicalPath(self):
"""
Return the path of form we render.
This function is required to be able to use ZopeProfiler product with
listbox.
"""
return self.field.getPhysicalPath()
def getLineClass(self):
"""Return a class object for a line. This must be overridden.
"""
......@@ -2800,7 +2808,7 @@ class ListBoxValidator(Validator.Validator):
if len(listbox)>0:
list_method = field.get_value('list_method')
list_method = getattr(here, list_method.method_name)
REQUEST.set('listbox',listbox)
REQUEST.set(field.id, listbox)
object_list = list_method(REQUEST=REQUEST,**params)
for uid in listbox_uids:
if str(uid).find('new') == 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment