protected override void initializePageHandlers(EditorItem <Domain.Role> page)
        {
            base.initializePageHandlers(page);
            RoleEditorItem editorPage = (RoleEditorItem)page;

            editorPage.getRoleForm().RolePanel.Changed += onRolePanelChange;
            editorPage.getRoleForm().RolePanel.ItemChanged += onRolePanelItemChange;
            editorPage.getRoleForm().RolePanel.ItemDeleted += onRolePanelItemDeleted;
        }
        public override Application.OperationState Create()
        {
            Domain.Role root = GetRoleService().getRootRole();

            RoleEditorItem page = (RoleEditorItem)getRoleEditor().addOrSelectPage(root);

            page.Title = "Roles";
            initializePageHandlers(page);
            getRoleEditor().ListChangeHandler.AddNew(root);
            return(OperationState.CONTINUE);
        }
        private void onRolePanelItemChange(object item)
        {
            if (!(item is Domain.Role))
            {
                return;
            }
            RoleEditorItem page = (RoleEditorItem)getRoleEditor().getActivePage();

            if (page == null)
            {
                return;
            }
            page.EditedObject.UpdateChild((Domain.Role)item);
            OnChange();
        }