directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r583746 - /directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryObjectclassWizardPage.java
Date Thu, 11 Oct 2007 09:06:27 GMT
Author: pamarcelot
Date: Thu Oct 11 02:06:27 2007
New Revision: 583746

URL: http://svn.apache.org/viewvc?rev=583746&view=rev
Log:
Part of a fix for DIRSTUDIO-221 (Improve Object Class selection in the New Entry Wizard).
Added a warning message when the object class selection does not contain any structural object
class.

Modified:
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryObjectclassWizardPage.java

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryObjectclassWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryObjectclassWizardPage.java?rev=583746&r1=583745&r2=583746&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryObjectclassWizardPage.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryObjectclassWizardPage.java
Thu Oct 11 02:06:27 2007
@@ -173,12 +173,31 @@
     {
         if ( !selectedObjectClasses.isEmpty() )
         {
+            boolean hasOneStructuralOC = false;
+            for ( ObjectClassDescription ocd : selectedObjectClasses )
+            {
+                if ( ocd.isStructural() )
+                {
+                    hasOneStructuralOC = true;
+                    break;
+                }
+            }
+            if ( !hasOneStructuralOC )
+            {
+                setMessage( "Please select at least one structural object class.", WizardPage.WARNING
);
+            }
+            else
+            {
+                setMessage( null );
+            }
+
             setPageComplete( true );
             saveState();
         }
         else
         {
             setPageComplete( false );
+            setMessage( null );
         }
     }
 



Mime
View raw message