directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1409849 - in /directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2: dialogs/ editor/
Date Thu, 15 Nov 2012 15:51:19 GMT
Author: pamarcelot
Date: Thu Nov 15 15:51:18 2012
New Revision: 1409849

URL: http://svn.apache.org/viewvc?rev=1409849&view=rev
Log:
Part of a fix for DIRSTUDIO-847 (Add support for replication editing in the ApacheDS 2.0 Configuration
Editor).
Added listeners to the details page of a consumer.
Added an Attribute Dialog for attributes selection.

Added:
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/AttributeDialog.java
Modified:
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages.properties
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages_de.properties
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages_fr.properties
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ReplicationDetailsPage.java

Added: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/AttributeDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/AttributeDialog.java?rev=1409849&view=auto
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/AttributeDialog.java
(added)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/AttributeDialog.java
Thu Nov 15 15:51:18 2012
@@ -0,0 +1,144 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.apacheds.configuration.v2.dialogs;
+
+
+import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * The AttributeDialog is used to enter/select an attribute type.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class AttributeDialog extends Dialog
+{
+    /** The possible attribute types and OIDs. */
+    private String[] attributeTypesAndOids;
+
+    /** The attribute. */
+    private String attribute;
+
+    /** The combo. */
+    private Combo typeOrOidCombo;
+
+    /** The OK button of the dialog */
+    private Button okButton;
+
+
+    /**
+     * Creates a new instance of AttributeDialog.
+     * 
+     * @param parentShell the parent shell
+     * @param attribute the attribute, null if none 
+     * @param attributeNamesAndOids the possible attribute names and OIDs
+     */
+    public AttributeDialog( Shell parentShell, String attribute, String[] attributeNamesAndOids
)
+    {
+        super( parentShell );
+        this.attribute = attribute;
+        this.attributeTypesAndOids = attributeNamesAndOids;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void configureShell( Shell newShell )
+    {
+        super.configureShell( newShell );
+        newShell.setText( Messages.getString( "AttributeDialog.SelectAttributeTypeOrOID"
) ); //$NON-NLS-1$
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void createButtonsForButtonBar( Composite parent )
+    {
+        okButton = createButton( parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
true );
+        createButton( parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL,
false );
+
+        validate();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void okPressed()
+    {
+        attribute = typeOrOidCombo.getText();
+        super.okPressed();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected Control createDialogArea( Composite parent )
+    {
+        Composite composite = ( Composite ) super.createDialogArea( parent );
+
+        Composite c = BaseWidgetUtils.createColumnContainer( composite, 2, 1 );
+        BaseWidgetUtils.createLabel( c, Messages.getString( "AttributeDialog.AttributeTypeOrOID"
), 1 ); //$NON-NLS-1$
+        typeOrOidCombo = BaseWidgetUtils.createCombo( c, attributeTypesAndOids, -1, 1 );
+        if ( attribute != null )
+        {
+            typeOrOidCombo.setText( attribute );
+        }
+        typeOrOidCombo.addModifyListener( new ModifyListener()
+        {
+            public void modifyText( ModifyEvent e )
+            {
+                validate();
+            }
+        } );
+
+        return composite;
+    }
+
+
+    private void validate()
+    {
+        okButton.setEnabled( !"".equals( typeOrOidCombo.getText() ) ); //$NON-NLS-1$
+    }
+
+
+    /**
+     * Gets the attribute.
+     * 
+     * @return the attribute
+     */
+    public String getAttribute()
+    {
+        return attribute;
+    }
+}

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages.properties?rev=1409849&r1=1409848&r2=1409849&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages.properties
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages.properties
Thu Nov 15 15:51:18 2012
@@ -15,6 +15,8 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
+AttributeDialog.AttributeTypeOrOID=Attribute Type or OID:
+AttributeDialog.SelectAttributeTypeOrOID=Select Attribute Type or OID
 IndexDialog.AttributeID=Attribute ID:
 IndexDialog.CacheSize=Cache Size:
 IndexDialog.IndexedAttributeDialog=Indexed Attribute Dialog

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages_de.properties?rev=1409849&r1=1409848&r2=1409849&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages_de.properties
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages_de.properties
Thu Nov 15 15:51:18 2012
@@ -15,6 +15,8 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
+AttributeDialog.AttributeTypeOrOID=Attribut Typ oder OID:
+AttributeDialog.SelectAttributeTypeOrOID=Attribut Typ oder OID ausw\u00E4hlen
 IndexDialog.AttributeID=Attribut ID:
 IndexDialog.CacheSize=Cachegr\u00F6\u00DFe:
 IndexDialog.IndexedAttributeDialog=Indiziertes Attribut

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages_fr.properties?rev=1409849&r1=1409848&r2=1409849&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages_fr.properties
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/dialogs/messages_fr.properties
Thu Nov 15 15:51:18 2012
@@ -15,6 +15,8 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
+AttributeDialog.AttributeTypeOrOID=Type d'attribut ou OID:
+AttributeDialog.SelectAttributeTypeOrOID=Selection d'un type d'attribut ou OID
 IndexDialog.AttributeID=ID de l'attribut:
 IndexDialog.CacheSize=Taille du cache:
 IndexDialog.IndexedAttributeDialog=Dialogue d'attribut index\u00E9

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ReplicationDetailsPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ReplicationDetailsPage.java?rev=1409849&r1=1409848&r2=1409849&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ReplicationDetailsPage.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ReplicationDetailsPage.java
Thu Nov 15 15:51:18 2012
@@ -20,20 +20,34 @@
 package org.apache.directory.studio.apacheds.configuration.v2.editor;
 
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.directory.server.config.beans.ReplConsumerBean;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.name.Dn;
+import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.studio.apacheds.configuration.v2.dialogs.AttributeDialog;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.EntryWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.FilterWidget;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
@@ -78,6 +92,12 @@ public class ReplicationDetailsPage impl
     /** The browser connection */
     private IBrowserConnection browserConnection;
 
+    /** The array of attributes names and OIDs */
+    private String[] attributeNamesAndOids;
+
+    /** The list of attributes */
+    private List<String> attributesList;
+
     // UI Widgets
     private Button enabledCheckbox;
     private Text idText;
@@ -158,6 +178,47 @@ public class ReplicationDetailsPage impl
         }
     };
 
+    private ISelectionChangedListener attributesTableViewerSelectionListener = new ISelectionChangedListener()
+    {
+        public void selectionChanged( SelectionChangedEvent event )
+        {
+            updateAttributesButtonsEnableState();
+        }
+    };
+
+    /** The Double Click Listener for the Indexed Attributes Table Viewer */
+    private IDoubleClickListener attributesTableViewerDoubleClickListener = new IDoubleClickListener()
+    {
+        public void doubleClick( DoubleClickEvent event )
+        {
+            editSelectedAttribute();
+        }
+    };
+
+    private SelectionListener addAttributeButtonSelectionListener = new SelectionAdapter()
+    {
+        public void widgetSelected( SelectionEvent e )
+        {
+            addNewAttribute();
+        }
+    };
+
+    private SelectionListener editAttributeButtonSelectionListener = new SelectionAdapter()
+    {
+        public void widgetSelected( SelectionEvent e )
+        {
+            editSelectedAttribute();
+        }
+    };
+
+    private SelectionListener deleteAttributeButtonSelectionListener = new SelectionAdapter()
+    {
+        public void widgetSelected( SelectionEvent e )
+        {
+            deleteSelectedAttribute();
+        }
+    };
+
 
     /**
      * Creates a new instance of ReplicationDetailsPage.
@@ -357,18 +418,21 @@ public class ReplicationDetailsPage impl
         GridLayout gl = new GridLayout( 2, false );
         gl.marginWidth = gl.marginHeight = 0;
         attributesTableComposite.setLayout( gl );
-        attributesTableComposite.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false,
3, 1 ) );
+        attributesTableComposite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true,
3, 1 ) );
         Table attributesTable = toolkit.createTable( attributesTableComposite, SWT.BORDER
);
-        attributesTable.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false, 1,
3 ) );
+        attributesTable.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true, 1, 3
) );
         attributesTableViewer = new TableViewer( attributesTable );
+        attributesTableViewer.setContentProvider( new ArrayContentProvider() );
 
         addAttributeButton = toolkit.createButton( attributesTableComposite, "Add...", SWT.PUSH
);
         addAttributeButton.setLayoutData( createNewButtonGridData() );
 
         editAttributeButton = toolkit.createButton( attributesTableComposite, "Edit...",
SWT.PUSH );
+        editAttributeButton.setEnabled( false );
         editAttributeButton.setLayoutData( createNewButtonGridData() );
 
         deleteAttributeButton = toolkit.createButton( attributesTableComposite, "Delete",
SWT.PUSH );
+        deleteAttributeButton.setEnabled( false );
         deleteAttributeButton.setLayoutData( createNewButtonGridData() );
 
         // Aliases Dereferencing Text
@@ -383,7 +447,172 @@ public class ReplicationDetailsPage impl
         // Search Aliases Dereferencing Button
         searchAliasesDereferencingButton = toolkit.createButton( composite, "Search", SWT.CHECK
);
         searchAliasesDereferencingButton.setLayoutData( new GridData( SWT.LEFT, SWT.CENTER,
false, false, 2, 1 ) );
+    }
+
+
+    /**
+     * Updates the attributes buttons enable state.
+     */
+    private void updateAttributesButtonsEnableState()
+    {
+        ISelection selection = attributesTableViewer.getSelection();
 
+        editAttributeButton.setEnabled( !selection.isEmpty() );
+        deleteAttributeButton.setEnabled( !selection.isEmpty() );
+    }
+
+
+    /**
+     * Adds a new attribute and opens the attribute dialog.
+     */
+    private void addNewAttribute()
+    {
+        AttributeDialog dialog = new AttributeDialog( addAttributeButton.getShell(), null,
getAttributeNamesAndOids() );
+
+        if ( AttributeDialog.OK == dialog.open() )
+        {
+            String newAttribute = dialog.getAttribute();
+
+            if ( !attributesList.contains( newAttribute ) )
+            {
+                attributesList.add( newAttribute );
+            }
+
+            attributesTableViewer.refresh();
+            attributesTableViewer.setSelection( new StructuredSelection( newAttribute ) );
+            masterDetailsBlock.setEditorDirty();
+        }
+    }
+
+
+    /**
+     * Opens an attribute dialog with the selected attribute in the attributes table viewer.
+     */
+    private void editSelectedAttribute()
+    {
+        StructuredSelection selection = ( StructuredSelection ) attributesTableViewer.getSelection();
+
+        if ( !selection.isEmpty() )
+        {
+            String attribute = ( String ) selection.getFirstElement();
+
+            AttributeDialog dialog = new AttributeDialog( addAttributeButton.getShell(),
attribute,
+                getAttributeNamesAndOids() );
+
+            if ( AttributeDialog.OK == dialog.open() )
+            {
+                attributesList.remove( attribute );
+
+                String newAttribute = dialog.getAttribute();
+
+                if ( !attributesList.contains( newAttribute ) )
+                {
+                    attributesList.add( newAttribute );
+                }
+
+                attributesTableViewer.refresh();
+                attributesTableViewer.setSelection( new StructuredSelection( newAttribute
) );
+                masterDetailsBlock.setEditorDirty();
+            }
+        }
+    }
+
+
+    /**
+     * Deletes the selected index in the indexes table viewer.
+     */
+    private void deleteSelectedAttribute()
+    {
+        StructuredSelection selection = ( StructuredSelection ) attributesTableViewer.getSelection();
+
+        if ( !selection.isEmpty() )
+        {
+            String attribute = ( String ) selection.getFirstElement();
+
+            attributesList.remove( attribute );
+            attributesTableViewer.refresh();
+            masterDetailsBlock.setEditorDirty();
+        }
+    }
+
+
+    /**
+     * Gets the array containing the attribute names and OIDs.
+     *
+     * @return the array containing the attribute names and OIDs
+     */
+    private String[] getAttributeNamesAndOids()
+    {
+        // Checking if the array has already be generated
+        if ( ( attributeNamesAndOids == null ) || ( attributeNamesAndOids.length == 0 ) )
+        {
+            List<String> attributeNamesList = new ArrayList<String>();
+            List<String> oidsList = new ArrayList<String>();
+
+            if ( browserConnection == null )
+            {
+                // Getting all connections in the case where no connection is found
+                IBrowserConnection[] connections = BrowserCorePlugin.getDefault().getConnectionManager()
+                    .getBrowserConnections();
+                for ( IBrowserConnection connection : connections )
+                {
+                    addAttributeNamesAndOids( connection.getSchema(), attributeNamesList,
oidsList );
+                }
+            }
+            else
+            {
+                // Only adding attribute names and OIDs from the associated connection
+                addAttributeNamesAndOids( browserConnection.getSchema(), attributeNamesList,
oidsList );
+            }
+
+            // Also adding attribute names and OIDs from the default schema
+            addAttributeNamesAndOids( Schema.DEFAULT_SCHEMA, attributeNamesList, oidsList
);
+
+            // Sorting the set
+            Collections.sort( attributeNamesList );
+            Collections.sort( oidsList );
+
+            attributeNamesAndOids = new String[attributeNamesList.size() + oidsList.size()];
+            System.arraycopy( attributeNamesList.toArray(), 0, attributeNamesAndOids, 0,
attributeNamesList
+                .size() );
+            System.arraycopy( oidsList.toArray(), 0, attributeNamesAndOids, attributeNamesList
+                .size(), oidsList.size() );
+        }
+
+        return attributeNamesAndOids;
+    }
+
+
+    /**
+     * Adds the attribute names and OIDs to the given set.
+     *
+     * @param schema the schema
+     * @param attributeNamesList the attribute names list
+     * @param oidsList the OIDs name list
+     */
+    private void addAttributeNamesAndOids( Schema schema, List<String> attributeNamesList,
List<String> oidsList )
+    {
+        if ( schema != null )
+        {
+            Collection<AttributeType> atds = schema.getAttributeTypeDescriptions();
+            for ( AttributeType atd : atds )
+            {
+                // OID
+                if ( !oidsList.contains( atd.getOid() ) )
+                {
+                    oidsList.add( atd.getOid() );
+                }
+
+                // Names
+                for ( String name : atd.getNames() )
+                {
+                    if ( !attributeNamesList.contains( name ) )
+                    {
+                        attributeNamesList.add( name );
+                    }
+                }
+            }
+        }
     }
 
 
@@ -420,10 +649,11 @@ public class ReplicationDetailsPage impl
         subtreeScopeButton.addSelectionListener( buttonSelectionListener );
         oneLevelScopeButton.addSelectionListener( buttonSelectionListener );
         objectScopeButton.addSelectionListener( buttonSelectionListener );
-        //attributesTableViewer;
-        //addAttributeButton;
-        //editAttributeButton;
-        //deleteAttributeButton;
+        attributesTableViewer.addDoubleClickListener( attributesTableViewerDoubleClickListener
);
+        attributesTableViewer.addSelectionChangedListener( attributesTableViewerSelectionListener
);
+        addAttributeButton.addSelectionListener( addAttributeButtonSelectionListener );
+        editAttributeButton.addSelectionListener( editAttributeButtonSelectionListener );
+        deleteAttributeButton.addSelectionListener( deleteAttributeButtonSelectionListener
);
         findingBaseDnAliasesDereferencingButton.addSelectionListener( buttonSelectionListener
);
         searchAliasesDereferencingButton.addSelectionListener( buttonSelectionListener );
     }
@@ -449,10 +679,11 @@ public class ReplicationDetailsPage impl
         subtreeScopeButton.removeSelectionListener( buttonSelectionListener );
         oneLevelScopeButton.removeSelectionListener( buttonSelectionListener );
         objectScopeButton.removeSelectionListener( buttonSelectionListener );
-        //attributesTableViewer;
-        //addAttributeButton;
-        //editAttributeButton;
-        //deleteAttributeButton;
+        attributesTableViewer.removeDoubleClickListener( attributesTableViewerDoubleClickListener
);
+        attributesTableViewer.removeSelectionChangedListener( attributesTableViewerSelectionListener
);
+        addAttributeButton.removeSelectionListener( addAttributeButtonSelectionListener );
+        editAttributeButton.removeSelectionListener( editAttributeButtonSelectionListener
);
+        deleteAttributeButton.removeSelectionListener( deleteAttributeButtonSelectionListener
);
         findingBaseDnAliasesDereferencingButton.removeSelectionListener( buttonSelectionListener
);
         searchAliasesDereferencingButton.removeSelectionListener( buttonSelectionListener
);
     }
@@ -700,7 +931,7 @@ public class ReplicationDetailsPage impl
             bindDnText.setText( checkNull( input.getReplUserDn() ) );
 
             // Bind Password
-            bindPasswordText.setText( checkNull( String.valueOf( input.getReplUserPassword()
) ) );
+            bindPasswordText.setText( checkNull( String.valueOf( new String( input.getReplUserPassword()
) ) ) );
 
             // Size Limit
             sizeLimitText.setText( checkNull( String.valueOf( input.getReplSearchSizeLimit()
) ) );
@@ -790,6 +1021,10 @@ public class ReplicationDetailsPage impl
                 findingBaseDnAliasesDereferencingButton.setSelection( true );
                 searchAliasesDereferencingButton.setSelection( true );
             }
+
+            // Attributes
+            attributesList = input.getReplAttributes();
+            attributesTableViewer.setInput( attributesList );
         }
 
         addListeners();



Mime
View raw message