directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1071346 - /directory/studio/branches/m1/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java
Date Wed, 16 Feb 2011 18:10:18 GMT
Author: elecharny
Date: Wed Feb 16 18:10:17 2011
New Revision: 1071346

URL: http://svn.apache.org/viewvc?rev=1071346&view=rev
Log:
Used the Dn.getParent() method

Modified:
    directory/studio/branches/m1/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java

Modified: directory/studio/branches/m1/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/m1/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java?rev=1071346&r1=1071345&r2=1071346&view=diff
==============================================================================
--- directory/studio/branches/m1/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java
(original)
+++ directory/studio/branches/m1/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java
Wed Feb 16 18:10:17 2011
@@ -167,9 +167,10 @@ public class EntryWidget extends Browser
         {
             public void widgetSelected( SelectionEvent e )
             {
-                if ( dn != null && DnUtils.getParent( dn ) != null )
+                if ( !Dn.isNullOrEmpty( dn ) )
                 {
-                    dn = DnUtils.getParent( dn );
+                    dn = dn.getParent();
+                    
                     dnChanged();
                     internalSetEnabled();
                     notifyListeners();
@@ -283,7 +284,7 @@ public class EntryWidget extends Browser
      */
     private void internalSetEnabled()
     {
-        upButton.setEnabled( dn != null && DnUtils.getParent( dn ) != null &&
dnCombo.isEnabled() );
+        upButton.setEnabled( !Dn.isNullOrEmpty( dn ) && dnCombo.isEnabled() );
         entryBrowseButton.setEnabled( browserConnection != null && dnCombo.isEnabled()
);
     }
 



Mime
View raw message