From 6411dcff8da8710f140a8782967ddf0876f52b81 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Mon, 31 May 2010 09:55:31 +0000
Subject: [PATCH] Provide the necessary operational attributes for External Changelog entries, to make them LDAP compliant and to allow browsing them through the Control-Panel. Improve browsing in the Control-Panel to make use of hasSubordinates as well as numSubordinates operational attributes. Improve Control-Panel look and feel when browsing the ECL

---
 opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java
index 8979783..36f830f 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java
@@ -36,7 +36,6 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.util.ArrayList;
-import java.util.List;
 
 import javax.swing.JButton;
 import javax.swing.JPanel;
@@ -627,15 +626,8 @@
   {
     final ArrayList<Message> errors = new ArrayList<Message>();
     // Check that the entry is correct.
-    // Rely in numsubordinates...
-    boolean isLeaf = true;
-
-    List<Object> o = searchResult.getAttributeValues("numsubordinates");
-    if (!o.isEmpty())
-    {
-      int numsubordinates = Integer.parseInt((String)o.iterator().next());
-      isLeaf = numsubordinates <= 0;
-    }
+    // Rely in numsubordinates and hassubordinates
+    boolean isLeaf = !BrowserController.getHasSubOrdinates(searchResult);
 
     if (treePath != null)
     {

--
Gitblit v1.10.0