From 05d3ff594de61a9da5695d043e5664f7e898c7ce Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Tue, 03 Nov 2009 17:23:57 +0000
Subject: [PATCH] Fix for issue 4336 (Control Panel: Structural changes won't refresh / no refresh button/menuentry) Add a new 'Refresh Contents' menu item in the 'View' menu of the 'Manage Entries' dialog.

---
 opends/src/guitools/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java |   14 +++++++++++++-
 opends/src/messages/messages/admin_tool.properties                              |    1 +
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java
index 9277f3e..c981a03 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java
@@ -1275,7 +1275,7 @@
       }
       menus[0].setSelected(true);
 
-      // Add the view menus
+      // Add the referral and sort data menus
       menu.add(new JSeparator());
       final JCheckBoxMenuItem sortUserData =
         new JCheckBoxMenuItem(INFO_CTRL_PANEL_SORT_USER_DATA.get().toString());
@@ -1319,6 +1319,18 @@
           }
         }
       });
+      // Add the refresh menu
+      menu.add(new JSeparator());
+      final JMenuItem refresh =
+        new JMenuItem(INFO_CTRL_PANEL_REFRESH_DATA.get().toString());
+      menu.add(refresh);
+      refresh.addActionListener(new ActionListener()
+      {
+        public void actionPerformed(ActionEvent ev)
+        {
+          entryPane.getController().startRefresh(null);
+        }
+      });
       return menu;
     }
 
diff --git a/opends/src/messages/messages/admin_tool.properties b/opends/src/messages/messages/admin_tool.properties
index 491d018..88df7b8 100644
--- a/opends/src/messages/messages/admin_tool.properties
+++ b/opends/src/messages/messages/admin_tool.properties
@@ -1540,6 +1540,7 @@
 INFO_CTRL_PANEL_LDIF_VIEW_MENU=LDIF View
 INFO_CTRL_PANEL_SORT_USER_DATA=Sort User Data
 INFO_CTRL_PANEL_FOLLOW_REFERRALS=Follow Referrals
+INFO_CTRL_PANEL_REFRESH_DATA=Refresh Contents
 INFO_CTRL_PANEL_DELETE_ENTRY_MENU=Delete Entry...
 INFO_CTRL_PANEL_DELETE_ENTRY_BUTTON=Delete Entry...
 INFO_CTRL_PANEL_DELETE_BASE_DN_MENU=Delete Base DN...

--
Gitblit v1.10.0