/// <summary>
        /// Initialisation des Handlers sur une nouvelle page.
        /// En plus des handlers de base, on initialise les handlers sur :
        /// - DesignerPropertiesPanel
        /// -
        /// - SpreadSheet
        /// -
        /// </summary>
        protected override void initializePageHandlers(EditorItem <Domain.Profil> page)
        {
            base.initializePageHandlers(page);
            ProfilEditorItem editorPage = (ProfilEditorItem)page;

            editorPage.getProfilForm().profileMainPanel.nameTextBox.KeyUp += onNameTextChange;
            editorPage.getProfilForm().profileMainPanel.nameTextBox.LostFocus += onNameTextLostFocus;
            editorPage.getProfilForm().profileMainPanel.RightsPanel.Changed += OnRightsChanged;
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="oid"></param>
        /// <returns></returns>
        public override OperationState Open(Domain.Profil profil)
        {
            ProfilEditorItem page = (ProfilEditorItem)getEditor().addOrSelectPage(profil);

            initializePageHandlers(page);
            page.getProfilForm().displayObject();
            getEditor().ListChangeHandler.AddNew(profil);
            return(OperationState.CONTINUE);
        }
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        protected virtual OperationState ValidateEditedNewName(string newName = "")
        {
            ProfilEditorItem page = (ProfilEditorItem)getProfilEditor().getActivePage();

            if (page == null)
            {
                return(OperationState.CONTINUE);
            }
            Domain.Profil table = page.EditedObject;
            if (string.IsNullOrEmpty(newName))
            {
                newName = page.getProfilForm().profileMainPanel.nameTextBox.Text.Trim();
            }
            if (string.IsNullOrEmpty(newName))
            {
                DisplayError("Empty Name", "The Profil name can't be mepty!");
                page.getProfilForm().profileMainPanel.nameTextBox.SelectAll();
                page.getProfilForm().profileMainPanel.nameTextBox.Focus();
                return(OperationState.STOP);
            }

            bool found = false;

            if (GetProfilService().getByName(newName) != null)
            {
                found = true;
            }

            foreach (ProfilEditorItem unReco in getProfilEditor().getPages())
            {
                if ((found && newName != getProfilEditor().getActivePage().Title) || (unReco != getProfilEditor().getActivePage() && newName == unReco.Title))
                {
                    DisplayError("Duplicate Name", "There is another Target named: " + newName);
                    page.getProfilForm().profileMainPanel.nameTextBox.Text = page.Title;
                    page.getProfilForm().profileMainPanel.nameTextBox.SelectAll();
                    page.getProfilForm().profileMainPanel.nameTextBox.Focus();
                    return(OperationState.STOP);
                }
            }
            if (!IsRenameOnDoubleClick)
            {
                if (table.name.ToUpper().Equals(newName.ToUpper()))
                {
                    return(OperationState.CONTINUE);
                }
            }

            ((ProfilSideBar)SideBar).ProfilGroup.profilTreeview.updateProfil(newName, table.name, false);
            table.name = newName;
            page.Title = newName;
            page.getProfilForm().profileMainPanel.nameTextBox.Text = newName;
            OnChange();
            return(OperationState.CONTINUE);
        }
        /// <summary>
        /// Cette methode est exécuté lorsqu'on édit le nom de la table active.
        /// Si l'utilisateur tappe sur la touche ENTER, le nouveau nom est validé.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        protected void onNameTextChange(object sender, KeyEventArgs args)
        {
            ProfilEditorItem page = (ProfilEditorItem)getProfilEditor().getActivePage();

            if (args.Key == Key.Escape)
            {
                page.getProfilForm().profileMainPanel.nameTextBox.Text = page.Title;
            }
            else if (args.Key == Key.Enter)
            {
                ValidateEditedNewName();
            }
        }