Error with User or Admin Setting Window

StatusIDPriorityType
Closed30617CriticalQuestion
ProfileReply
niemimikClient

HI!

We trying to open Setting view (SettingsObject_DetailView_User)

In Module :

Xafari.BC.Settings.SettingsAccessor.CreateServiceInstance =
xafApplication =>
new Xafari.BC.Settings.Runtime.SettingsAccessorDesigner()
.Slice1()
.SetupCurrentSlice(accessor =>
{
var currentUser = SecuritySystem.CurrentUser as xVasu.Data.Security.xVasuSecuritySystemUser;
if (currentUser != null)
accessor.ObjectSpace.AppSettings().CurrentSlice(currentUser);
})
.CreateSettingsAccessor();

extenders.Add();

IN Settings :

public interface IModelxVasuSettings
{
DefaultValues DefaultValues { get; }
//UISettingsValues UISettingsValues { get; }
}

public interface DefaultValues : IModelBCSettingsGroup
{
[ModelDefault("Value", "4")] [ModelDefault("Caption", "Varauksen voimassaoloaika")] IModelKeyInt varausvoimassaolo { get; }

[ModelDefault("Value", "250")] [ModelDefault("Caption", "Oletusvakuus")] IModelKeyDouble vakuussumma { get; }
}
Ends up with error :

System.InvalidOperationException: Exception occurs while assigning the 'DetailView, ID:SettingsObject_DetailView_User' view to WinWindow:
Objektin viittaukseksi ei voi määrittää objektiesiintymää. ---> System.NullReferenceException: Objektin viittaukseksi ei voi määrittää objektiesiintymää.
kohteessa Xafari.BC.Settings.Win.WinSettingsPropertyEditor.InitTreeListGroup()
kohteessa Xafari.BC.Settings.Win.WinSettingsPropertyEditor.CreateControlCore()
kohteessa DevExpress.ExpressApp.Editors.ViewItem.CreateControl()
kohteessa DevExpress.ExpressApp.Win.Layout.WinLayoutManager.GetControl(ViewItem

Replies

UserDescriptionPosted On
MariyaVoytovichAgent

Hello niemimik!

If you want to use settings with one slice, you need write in module:

static MyApplicationModule
{
Xafari.BC.Settings.SettingsAccessor.CreateServiceInstance =
xafApplication =>
new Xafari.BC.Settings.Runtime.SettingsAccessorDesigner()
.SetupCurrentSlice(accessor =>
{
var currentUser = SecuritySystem.CurrentUser as xVasu.Data.Security.xVasuSecuritySystemUser;
if (currentUser != null)
accessor.ObjectSpace.AppSettings().CurrentSlice(currentUser);
})
.CreateSettingsAccessor();
}
public override void ExtendModelInterfaces(ModelInterfaceExtenders extenders)
{
extenders.Add<IModelBCSettings, IModelxVasuSettings>();
}

Feel free to reactivate this issue if you need any further clarification on the subject.

Regards,
Mariya
On behalf of Xafari Client Services Team

niemimik

HI!

Thanks's for response.

We tried that solution but still getting same error. Something else that we can try..

BR,

-mikko

MariyaVoytovichAgent

Hello niemimik!

In order to fix the issue, we must first reproduce the issue in our labs.
Unfortunately we are unable to reproduce the issue. We do not have ideas why this error can occur on your machine either.
Could you please provide us with the following info?
1. A small demo project, reproducing the problem;
2. Detailed steps to reproduce the problem.
We want to help you and are looking forward to hearing from you.

Regards,
Mariya
On behalf of Xafari Client Services Team

niemimik

HI!

OK! But i think we cannot do that. Our app is very large and we do not which module causes that problem.

If you send us latest sourcecodes (according our license) we can debug it out. Then we let you know...

-mikko

MariyaVoytovichAgent

We sent the source code of the Xafari Framework to your email.

Feel free to contact us if you have any questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

× This ticket is closed.

Write US