Commit 6a52c06a authored by Jean-Paul Smets's avatar Jean-Paul Smets

fixed new list rendering through get_value. It now works


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1262 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4035b942
...@@ -736,7 +736,9 @@ class ListBoxWidget(Widget.Widget): ...@@ -736,7 +736,9 @@ class ListBoxWidget(Widget.Widget):
total_size += s[4] total_size += s[4]
if render_format == 'list': if render_format == 'list':
start = 0 start = 0
end = total_size end = total_size
total_pages = 1
current_page = 0
else: else:
try: try:
start = REQUEST.get('list_start') start = REQUEST.get('list_start')
...@@ -1496,9 +1498,9 @@ class ListBox(ZMIField): ...@@ -1496,9 +1498,9 @@ class ListBox(ZMIField):
security.declareProtected('Access contents information', 'get_value') security.declareProtected('Access contents information', 'get_value')
def get_value(self, id, **kw): def get_value(self, id, **kw):
if id == 'default' and kw.get('render_format') in ('list', ): if id == 'default' and kw.get('render_format') in ('list', ):
return self.widget.render(self, self.generate_field_key() , None , kw.get('REQUEST'), render_format=render_format) return self.widget.render(self, self.generate_field_key() , None , kw.get('REQUEST'), render_format=kw.get('render_format'))
else: else:
ZMIField.get_value(self, id, **kw) return ZMIField.get_value(self, id, **kw)
# Psyco # Psyco
import psyco import psyco
......
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