Bug 116313 - Wrong items pagination in admin ui (folder contents) : not reset when changing of folder
Wrong items pagination in admin ui (folder contents) : not reset when changin...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise CMS
Classification: Retired
Component: ui (Show other bugs)
6.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: ccm-bugs-list
Jon Orris
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-02-19 18:11 EST by durnez
Modified: 2007-04-18 13:03 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-05 13:47:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description durnez 2004-02-19 18:11:34 EST
Description of problem:
Pagination of displayed items within a folder (right part of content
section page, "browse" tab) is not reset when one choose a new folder
in folder tree (left part of the page).

This leads to weird behaviour (as explained below)

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1.i looked at the contents of a folder that contains many items, i
click "next" several times, i go till 4th page for instance.
2. i change of folder by clicking on the left part of the page (folder
tree), i choose a folder that contains only a couple of items (hence
no need to have several pages)
3. this new folder tells that it does not contain anything... which is
wrong.
  
Actual results:


Expected results:
when clicking to a new folder, pagination should be reset, and it is not.

Additional info:
Comment 1 durnez 2004-02-19 18:14:34 EST
to solve that issue, on has to modify class :
com.arsdigita.cms.ui.folder.FolderManipulator

in inner class constructor ItemView(), just after m_paginator
creation, one add :
m_srcFolderSel.addChangeListener(new ResetPaginator(m_paginator));

with ResetPaginator being the following inner class :

   private class ResetPaginator implements ChangeListener {
    	
    	private Paginator m_pag;
    	
		ResetPaginator(Paginator pag) {
		m_pag = pag;
		}
		
	   public void stateChanged(ChangeEvent e){
		PageState st = e.getPageState();
		m_pag.reset(st);	
		}
    }
Comment 2 durnez 2004-02-19 18:20:39 EST
next is a "diff -u" with 6.0.1 : sorry for import reorganization
(eclipse job).

---
ccm-cms-6.0.1/src/com/arsdigita/cms/ui/folder/FolderManipulator.java 
      2003-12-19 17:44:51.000000000 +0100
+++ carrefour/src/com/arsdigita/cms/ui/folder/FolderManipulator.java 
  2004-02-19 23:55:16.000000000 +0100
@@ -15,6 +15,12 @@
  
 package com.arsdigita.cms.ui.folder;
  
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.apache.log4j.Logger;
+
 import com.arsdigita.bebop.BoxPanel;
 import com.arsdigita.bebop.Component;
 import com.arsdigita.bebop.Container;
@@ -34,6 +40,8 @@
 import com.arsdigita.bebop.SimpleContainer;
 import com.arsdigita.bebop.Table;
 import com.arsdigita.bebop.Tree;
+import com.arsdigita.bebop.event.ChangeEvent;
+import com.arsdigita.bebop.event.ChangeListener;
 import com.arsdigita.bebop.event.FormProcessListener;
 import com.arsdigita.bebop.event.FormSectionEvent;
 import com.arsdigita.bebop.event.FormSubmissionListener;
@@ -73,12 +81,6 @@
 import com.arsdigita.toolbox.ui.ActionGroup;
 import com.arsdigita.util.Assert;
 import com.arsdigita.web.Web;
-import com.arsdigita.workflow.simple.Workflow;
-import org.apache.log4j.Logger;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Arrays;
  
 /**
  * Browse folders and manipulate them with various actions
@@ -430,6 +432,7 @@
             m_paginator = new Paginator
                 ((PaginationModelBuilder)m_browser.getModelBuilder(),
                  FlatItemList.LIST_SIZE);
+             m_srcFolderSel.addChangeListener(new
ResetPaginator(m_paginator));
             panel.add(m_paginator);
             panel.add(m_browser);
  
@@ -577,4 +580,17 @@
             return new ControlLink(l);
         }
     }
+    private class ResetPaginator implements ChangeListener {
+
+       private Paginator m_pag;
+
+               ResetPaginator(Paginator pag) {
+               m_pag = pag;
+               }
+
+          public void stateChanged(ChangeEvent e){
+               PageState st = e.getPageState();
+               m_pag.reset(st);
+               }
+    }
 }
Comment 3 Scott Seago 2004-02-19 18:22:01 EST
This is a duplicate of 107901. Fix for 107901 has already been
incorporated into the trunk, but not 6.0.
Comment 4 Jon Orris 2006-09-05 13:47:43 EDT
Closing old tickets



Note You need to log in before you can comment on or make changes to this bug.