From 704d4a34fde6dad47bcdf37a2d03d42e17b32e03 Mon Sep 17 00:00:00 2001 From: tof <> Date: Tue, 2 Sep 2008 11:14:40 +0000 Subject: TActivePager: Fix handleCallback method to allow subclassing. --- framework/Web/UI/ActiveControls/TActivePager.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/framework/Web/UI/ActiveControls/TActivePager.php b/framework/Web/UI/ActiveControls/TActivePager.php index 7e5ee33e..bee36c22 100644 --- a/framework/Web/UI/ActiveControls/TActivePager.php +++ b/framework/Web/UI/ActiveControls/TActivePager.php @@ -176,12 +176,16 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl // Update all the buttons pagers attached to the same control. // Dropdown pagers doesn't need to be re-rendered. $controlToPaginate=$this->getControlToPaginate(); - foreach ($this->getNamingContainer()->findControlsByType('TActivePager') as $control) + foreach ($this->getNamingContainer()->findControlsByType('TActivePager', false) as $control) { if ($control->getMode() !== TPagerMode::DropDownList && $control->getControlToPaginate()===$controlToPaginate) + { $control->render($param->getNewWriter()); + // FIXME : With some very fast machine, the getNewWriter() consecutive calls are in the same microsecond, resulting + // of getting the same boundaries in ajax response. Wait 1 microsecond to avoid this. + usleep(1); + } } - // Raise callback event $this->onCallback($param); } -- cgit v1.2.3