[Erp5-report] r28536 - /erp5/trunk/products/ERP5Form/SelectionTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Aug 21 10:56:16 CEST 2009
Author: kazuhiko
Date: Fri Aug 21 10:56:14 2009
New Revision: 28536
URL: http://svn.erp5.org?rev=28536&view=rev
Log:
update an specified selection only in firstPage() and lastPage(), because modifying REQUEST will affect all listbox in the page. this will fix the failure in testPagerInViewMode of erp5_ui_test.
Modified:
erp5/trunk/products/ERP5Form/SelectionTool.py
Modified: erp5/trunk/products/ERP5Form/SelectionTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/SelectionTool.py?rev=28536&r1=28535&r2=28536&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/SelectionTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/SelectionTool.py [utf8] Fri Aug 21 10:56:14 2009
@@ -657,7 +657,11 @@
lastPage.
"""
if uids is None: uids = []
- REQUEST.form['list_start'] = 0
+ selection = self.getSelectionFor(list_selection_name, REQUEST)
+ if selection is not None:
+ params = selection.getParams()
+ params['list_start'] = 0
+ selection.edit(params=params)
self.uncheckAll(list_selection_name, listbox_uid)
return self.checkAll(list_selection_name, uids, REQUEST=REQUEST)
@@ -682,7 +686,8 @@
if total_lines != BIG_INT:
lines_per_page = params.get('list_lines', 1)
last_page_start = int(total_lines) - (int(total_lines) % int(lines_per_page))
- REQUEST.form['list_start'] = last_page_start
+ params['list_start'] = last_page_start
+ selection.edit(params=params)
self.uncheckAll(list_selection_name, listbox_uid)
return self.checkAll(list_selection_name, uids, REQUEST=REQUEST)
More information about the Erp5-report
mailing list