Closed CWolffIF closed 4 years ago
We will try to answer all questions that do not require research within 24hr. To prioritize cases that require research we use the following labels in order. For all other issues the posting time is respected.
This case is prioritized.
First apologies for the delay.
So, we are talking again cases similar to your other already addressed #659, #652.
Again this stack provides no info and from #659 we know that problems may occured under certain model configurations https://github.com/eXpandFramework/eXpand/issues/659#issuecomment-575920637
also #652 tells us that things can go wrong when
So please go through those two posts and try to provide a sample that I can repro, my guess is that it shouldn't be hard to create a new solution put a few BO that participate in the detailview that fails add the modeldiffs and register the Xpand modules that u have in your main app
Hi Tolis,
it works on the first opening of the view. The node is there and I can expand/collapse. (see screenshot 'first opening')
But if I close the View and open it again the error is shown. If I go to the model I can see that the node is not there anymore. (see screenshot 'second opening')
When I "Reset Difference' the node is there and it works again.
still this info is nto enough to reproduce my resources are limited and cannot try random combinations until i get it. This Project_detaillView looks simple did u tried to add it in a new sample and register the xpandSystemWindowsFormsModule? My guess is that u can reproduce it. do not forget the modedill u have there
Hi Tolis,
here is a sample where you can see that node disapears after using Collapse/Expand (see my post before).
The errormessage did not appear, but that might have other reasons, cause the sample is very simple.
Hi,
Your sample was broken at least it does not compile on my side and needs hours to make it work. So I created a new one where I register the ModelMapper as this is the module that does the extension. and extended the model as per docs with this code
public override void Setup(ApplicationModulesManager moduleManager){
base.Setup(moduleManager);
moduleManager.Extend(PredefinedMap.LayoutControlGroup);
}
as you see in my screen cast it works fine. The attach sample use PackagesReference and not packages.config so there are no hintpath and it for sure will work on your side. Can you try to modify it to repro the problem? Can u aslo provide me a screen cast? Solution24.zip
Hi Tolis,
Your sample has the same problem. Here is my process in your sample
Here is my version of your sample with the Address item in the Navigation and Expand in the item1 LayoutGroup.
Hi,
there is a second problem in your sample.
If I try to update the model in VS Solution24.Module I got the error
------- Updating model differences: Project: C:\DevProjects\Solution24\Solution24\Solution24.Module\Solution24.Module.csproj Error: Exception occurs while initializing the 'Solution24.Module.Solution24Module' module: _xtraLayoutAssembly check that ModelMapperModule is added to the RequiredModuleTypes collection Update failed
But in your sample ModelMapperModule is added. public Solution24Module() { InitializeComponent(); BaseObject.OidInitializationMode = OidInitializationMode.AfterConstruction; RequiredModuleTypes.Add(typeof(ModelMapperModule)); }
And I can not open the modeleditor in VS.
If I comment the lines
//public override void Setup(ApplicationModulesManager moduleManager)
//{
// base.Setup(moduleManager);
// moduleManager.Extend(PredefinedMap.LayoutControlGroup);
//}
everything works.
Here is a Screencast Modeleditor.zip
Here is a Screencast for the SampleSolution24 Sample.zip
thnks yes i see the problem unfortunately this is standard XAF behaviour as the LayoutControl is an extension of the IModelViewLayoutElement when the model gets modified it is removed as an empty element. I need to consult with the XAF model team b4 I attempt a workaround
the problem can be reproduced without the modelmapper as
public interface IModelTest:IModelViewLayoutElement{
string Test{ get; set; }
}
public interface IModelLayoutElementTest:IModelNode{
IModelTest Test{ get; }
}
public override void ExtendModelInterfaces(ModelInterfaceExtenders extenders){
base.ExtendModelInterfaces(extenders);
extenders.Add<IModelLayoutGroup,IModelLayoutElementTest>();
}
so the real question is how we can extend the IModelLayoutGroup, I hope the XAF team has a answer cause it requires a lot of refactor to follow another not strongly typed path.
Hi Tolis,
is it possible to remove the LayoutControlGroup from the Modelmapper?
why u want to remove it does it make problems if u are not using it?
Yes, I need the Collapse/Expand in my Application. And this Feature is in standard XAF. But if the LayoutControlGroup is missing I got the Error above.
i am looking into it
my understanding is that u refere to
Xpand.ExpressApp.Win.SystemModule.LayoutControlGroupController.OnGroupExpandChanged(Object sender, LayoutGroupEventArgs e) in D:\a\1\s\Xpand\Xpand.ExpressApp\Xpand.ExpressApp.Win\SystemModule\LayoutControlGroupModelAdapterController.cs:Zeile 23.
if so did you tried to disable the LayoutControlGroupModelAdapterController?
public class DisableLayoutControlGroupModelAdapterController:LayoutControlGroupController {
protected override void OnActivated() {
}
}
The pre-release 2.201.2.1 in the DevExpress.XAF lab
branch includes commits that relate to this task:
Released packages:
Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.
If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.
Thanks a lot for your contribution.
the LayoutControlGroup confiuration is now moved to
u can create more contexts if u wish and assign them. The LayoutControlGroupController is removed and there is no two way binding to this feature as it make sense only for the expanding which is already buildin in XAF.
Let me know if it works well for u.
Hi Tolis,
it doesnยดt work.
If I select "(none)" I got the error: iXISXRM.Win.exe Error: 0 : 09.04.20 13:46:46.114 ================================================================================ The error occurred:
Type: ArgumentNullException
Message: Der Wert darf nicht NULL sein.
Parametername: source Data: 0 entries Stack trace:
bei System.Linq.Enumerable.Select[TSource,TResult](IEnumerable1 source, Func
2 selector)
bei Xpand.XAF.Modules.ModelMapper.Services.ModelBindingService.ToBindableData(IModelNode node, ObjectView objectView) in D:\a\1\s\src\Modules\ModelMapper\Services\ModelBindingService.cs:Zeile 151.
bei Xpand.XAF.Modules.ModelMapper.Services.ModelBindingService.<>c.
And if I select "Default" I got the Error from before: iXISXRM.Win.exe Error: 0 : 09.04.20 13:43:44.670 ================================================================================ The error occurred:
Type: NullReferenceException
Message: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
Data: 0 entries
Stack trace:
bei Xpand.ExpressApp.Win.SystemModule.LayoutControlGroupController.OnGroupExpandChanged(Object sender, LayoutGroupEventArgs e) in D:\a\1\s\Xpand\Xpand.ExpressApp\Xpand.ExpressApp.Win\SystemModule\LayoutControlGroupModelAdapterController.cs:Zeile 23. bei DevExpress.XtraLayout.LayoutControl.DevExpress.XtraLayout.ILayoutControl.RaiseGroupExpandChanged(LayoutGroupEventArgs e) bei DevExpress.XtraLayout.LayoutGroup.set_Expanded(Boolean value) bei DevExpress.ExpressApp.Win.Layout.XafLayoutControlGroup.set_Expanded(Boolean value) bei DevExpress.XtraLayout.Handlers.LayoutGroupHandler.DoInvertGroupExpanded(LayoutGroup group) bei DevExpress.XtraLayout.Handlers.LayoutGroupHandler.ProcessGroupActions(EventType eventType, MouseEventArgs e) bei DevExpress.XtraLayout.Handlers.LayoutGroupHandler.PerformOwnersActions(EventType eventType, MouseEventArgs e) bei DevExpress.XtraLayout.Handlers.BaseLayoutItemHandler.PerformControlActions(EventType eventType, MouseEventArgs e) bei DevExpress.XtraLayout.Handlers.LayoutGroupHandler.PerformControlActions(EventType eventType, MouseEventArgs e) bei DevExpress.XtraLayout.Handlers.LayoutControlHandler.PerformChildHandlerActions(EventType eventType, MouseEventArgs e) bei DevExpress.XtraLayout.Handlers.LayoutControlHandler.PerformControlActions(EventType eventType, MouseEventArgs e) bei DevExpress.XtraLayout.Handlers.LayoutControlHandler.OnMouseDown(MouseEventArgs e) bei DevExpress.XtraLayout.Handlers.LayoutControlHandler.OnMouseDown(Object sender, MouseEventArgs e) bei DevExpress.XtraLayout.LayoutControl.OnMouseDown(MouseEventArgs e) bei System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) bei System.Windows.Forms.Control.WndProc(Message& m) bei System.Windows.Forms.ScrollableControl.WndProc(Message& m) bei System.Windows.Forms.ContainerControl.WndProc(Message& m) bei DevExpress.XtraLayout.LayoutControl.WndProc(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) InnerException is null
hmm i will address the None case, however u do not need to explicit set to none if your DEfault context is not modified it will do nothing. It still throw cause Xpand build is not yet published where the LayoutControlGroupController is removed. There will be a notfication again from the bot once the build is released,
eXpand.lab release 19.2.700.0 includes commit that relate to this task:
Please test if it addresses the problem. If you use nuget add our LAB NugetServer as a nuget package source in VS.
Thanks a lot for your contribution.
If I try to update the model in VS Solution24.Module I got the error
expected behavior as I added the extension in an agnostic module that knows nothing about the win libs
moduleManager.Extend(PredefinedMap.LayoutControlGroup);
Issue is deprioritized
as no Assignee found
and scheduled for auto-close
if no activity in the next 60 days
. Thanks a lot for your contribution.
Hi Tolis,
the Installer in 19.2.701.1 went wrong. But u can install the VSIX Package manually.
Installing Assemblies, Nuget, VSIX, Source into C:\Users\CWolff\Documents\eXpandFramework. Additional parameters: Version, Latest, Assets, InstallationPath 19.2.701.1 is a eXpand.lab version Downloading Sources from https://github.com/eXpandFramework/eXpand.lab/releases/download/19.2.701.1/Xpand-Source-19.2.701.1.zip into C:\Users\CWolff\Documents\eXpandFramework Exception calling "DownloadFile" with "2" argument(s): "Der angegebene Host ist unbekannt Der angegebene Host ist unbekannt" At C:\Users\CWolff\Documents\eXpandFramework\InstallXpand.ps1:73 char:9
Hi
I am not sure to what I can relate your post, at least I see no relation to this issue. Please explain
i also see that i can manually download from https://github.com/eXpandFramework/eXpand.lab/releases/download/19.2.701.1/Xpand-Source-19.2.701.1.zip
in addition I can do it by code
as in the installer lines that fail
can u retry? and if fails again try to check if the above lines work for u and repost on a new thread if a problem
Hi Tolis,
I tested all with 19.2.701.1 and it works. No more errors. Thanx.
The pre-release 2.201.2.2 in the DevExpress.XAF lab
branch includes commits that relate to this task:
To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all.
Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.
If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.
Thanks a lot for your contribution.
Hi,
if I have a List/Treeview with a corresponding Detailview (f.e. ICategorized) and I have a collapsible LayoutGroup in the Detailsection I got the Error below.
iXISXRM.Win.exe Error: 0 : 26.03.20 15:24:06.965 ================================================================================ The error occurred:
bei Xpand.ExpressApp.Win.SystemModule.LayoutControlGroupController.OnGroupExpandChanged(Object sender, LayoutGroupEventArgs e) in D:\a\1\s\Xpand\Xpand.ExpressApp\Xpand.ExpressApp.Win\SystemModule\LayoutControlGroupModelAdapterController.cs:Zeile 23. bei DevExpress.XtraLayout.LayoutControl.DevExpress.XtraLayout.ILayoutControl.RaiseGroupExpandChanged(LayoutGroupEventArgs e) bei DevExpress.XtraLayout.LayoutGroup.set_Expanded(Boolean value) bei DevExpress.ExpressApp.Win.Layout.XafLayoutControlGroup.set_Expanded(Boolean value) bei DevExpress.XtraLayout.Handlers.LayoutGroupHandler.DoInvertGroupExpanded(LayoutGroup group) bei DevExpress.XtraLayout.Handlers.LayoutGroupHandler.ProcessGroupActions(EventType eventType, MouseEventArgs e) bei DevExpress.XtraLayout.Handlers.LayoutGroupHandler.PerformOwnersActions(EventType eventType, MouseEventArgs e) bei DevExpress.XtraLayout.Handlers.BaseLayoutItemHandler.PerformControlActions(EventType eventType, MouseEventArgs e) bei DevExpress.XtraLayout.Handlers.LayoutGroupHandler.PerformControlActions(EventType eventType, MouseEventArgs e) bei DevExpress.XtraLayout.Handlers.LayoutControlHandler.PerformChildHandlerActions(EventType eventType, MouseEventArgs e)