Root: IMetabaseObjectDescriptor;
The Root property determines parameters of the navigator's root folder.
Executing the example requires a form and the Button1 button on the form. The repository must contain a folder with the F_ROOT identifier.
Add links to the Metabase, Ui assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
SecParams: IUiSecManagerParams;
Begin
Target := WinApplication.Instance.GetPluginTarget("Adm");
Context := Target.CreateExecutionContext;
SecParams := New UiSecManagerParams.Create;
SecParams.Metabase := MetabaseClass.Active; // Set metabase
SecParams.Root := SecParams.Metabase.ItemById("F_ROOT"); //Specify root folder
SecParams.Active := SecManagerMode.Navigator; // Activate the Navigator tab
Context.Data := SecParams;
Target.Execute("OpenNavigator", Context);
End Sub Button1OnClick
After executing the example the security manager is opened on the Navigator tab. The specified folder is set as the root folder.
See also: