Implementing OptimizedControllersCreation

StatusIDPriorityType
Closed28884BlockerBug
ProfileReply
mgibsonClient

When I implement the new XAF feature" OptimizedControllersCreation = true";
public PatTracWindowsFormsApplication() {
InitializeComponent();
this.OptimizedControllersCreation = true;

I get the following error when navigating tabs in detail view;

System.NullReferenceException: Object reference not set to an instance of an object.
at Xafari.Controllers.ActionSuccessMessageController.b__4(String actionId)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at Xafari.Controllers.ActionSuccessMessageController.OnActivated()
at DevExpress.ExpressApp.Controller.activeList_ResultValueChanged(Object sender, BoolValueChangedEventArgs e)
at DevExpress.ExpressApp.Utils.BoolList.OnResultValueChanged(Boolean oldResultValue, Boolean resultValue)
at DevExpress.ExpressApp.Utils.BoolList.EndUpdate()
at DevExpress.ExpressApp.Utils.BoolList.set_Item(String key, Boolean value)
at Xafari.Controllers.ActionSuccessMessageController.OnFrameAssigned()
at DevExpress.ExpressApp.Controller.SetFrame(Frame frame)
at DevExpress.ExpressApp.Frame.RegisterController(Controller controller)
at DevExpress.ExpressApp.Frame.Initialize(XafApplication application, TemplateContext context, ICollection`1 controllers)
at DevExpress.ExpressApp.XafApplication.CreateNestedFrame(ViewItem viewItem, TemplateContext context, View view)
at DevExpress.ExpressApp.Editors.ListPropertyEditor.InitializeFrame()
at DevExpress.ExpressApp.Editors.ListPropertyEditor.CreateControlCore()
at DevExpress.ExpressApp.Editors.ViewItem.CreateControl()
at DevExpress.ExpressApp.Win.Layout.WinLayoutManager.GetControl(ViewItem viewItem, String name, Boolean forceControlCreation)
at DevExpress.ExpressApp.Win.Layout.WinLayoutManager.controlItem_QueryControl(Object sender, QueryControlEventArgs e)
at DevExpress.ExpressApp.Win.Layout.XafLayoutControlItem.RaiseQueryControl()
at DevExpress.ExpressApp.Win.Layout.XafLayoutControlItem.RaiseShowHide(Boolean visible)
at DevExpress.XtraLayout.BaseLayoutItem.SetVisible(Boolean lVisible)
at DevExpress.XtraLayout.BaseLayoutItem.UpdateChildren(Boolean visible)
at DevExpress.XtraLayout.LayoutControlItem.UpdateChildren(Boolean visible)
at DevExpress.XtraLayout.LayoutGroup.UpdateChild(BaseLayoutItem item, Boolean visible)
at DevExpress.XtraLayout.LayoutGroup.UpdateChildren(Boolean visible)
at DevExpress.XtraLayout.TabbedGroup.UpdateChildren(Boolean visible)
at DevExpress.XtraLayout.LayoutGroup.UpdateChild(BaseLayoutItem item, Boolean visible)
at DevExpress.XtraLayout.LayoutGroup.UpdateChildren(Boolean visible)
at DevExpress.XtraLayout.LayoutGroup.UpdateChild(BaseLayoutItem item, Boolean visible)
at DevExpress.XtraLayout.LayoutGroup.UpdateChildren(Boolean visible)
at DevExpress.XtraLayout.LayoutControlImplementor.UpdateRoot()
at DevExpress.XtraLayout.LayoutControlImplementor.InvalidateRootOffsetControlsAndScrolls()
at DevExpress.XtraLayout.LayoutControlImplementor.Invalidate()
at DevExpress.XtraLayout.LayoutControl.DevExpress.XtraLayout.ILayoutControl.Invalidate()
at DevExpress.XtraLayout.BaseLayoutItem.Invalidate()
at DevExpress.XtraLayout.BaseLayoutItem.ComplexUpdate(Boolean shouldUpdateViewInfo, Boolean shouldResize, Boolean shouldArrangeTextSize)
at DevExpress.XtraLayout.TabbedGroup.set_SelectedTabPage(LayoutGroup value)
at DevExpress.XtraLayout.Handlers.LayoutGroupHandlerWithTabHelper.ActivateTab(Int32 tabIndex)
at DevExpress.XtraLayout.TabbedGroup.OnSelectedTabChanged(Object sender, EventArgs e)
at DevExpress.XtraLayout.Tab.LayoutTab.OnSelectedPageChanged(Object sender, ViewInfoTabPageChangedEventArgs e)
at DevExpress.XtraTab.ViewInfo.BaseTabControlViewInfo.OnSelectedPageChanged(IXtraTabPage prevPage)
at DevExpress.XtraTab.ViewInfo.BaseTabControlViewInfo.set_SelectedTabPage(IXtraTabPage value)
at DevExpress.XtraTab.ViewInfo.BaseTabHandler.OnMouseDown(MouseEventArgs e)
at DevExpress.Utils.Controls.BaseHandler.ProcessEvent(EventType etype, Object args)
at DevExpress.XtraLayout.Handlers.LayoutGroupHandlerWithTabHelper.ProcessMessage(EventType eventType, MouseEventArgs e)
at DevExpress.XtraLayout.Handlers.LayoutGroupHandlerWithTabHelper.ProcessTabActions(EventType eventType, MouseEventArgs e)
at DevExpress.XtraLayout.Handlers.LayoutGroupHandler.PerformOwnersActions(EventType eventType, MouseEventArgs e)
at DevExpress.XtraLayout.Handlers.BaseLayoutItemHandler.PerformControlActions(EventType eventType, MouseEventArgs e)
at DevExpress.XtraLayout.Handlers.LayoutGroupHandler.PerformControlActions(EventType eventType, MouseEventArgs e)
at DevExpress.XtraLayout.Handlers.LayoutControlHandler.PerformChildHandlerActions(EventType eventType, MouseEventArgs e)
at DevExpress.XtraLayout.Handlers.LayoutControlHandler.PerformControlActions(EventType eventType, MouseEventArgs e)
at DevExpress.XtraLayout.Handlers.LayoutControlHandler.OnMouseDown(MouseEventArgs e)
at DevExpress.XtraLayout.Handlers.LayoutControlHandler.OnMouseDown(Object sender, MouseEventArgs e)
at DevExpress.XtraLayout.LayoutControl.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at DevExpress.XtraLayout.LayoutControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

when I remove it everything works fine. This seems like a feature that I would like to have implemented and working.

Thanks,
michael

Replies

UserDescriptionPosted On
Sasha (Xafari Support)Client

Hello Michael,

Thanks for contacting us.
Please, inform us about your version of Xafari.

Best regards,
Sasha.

mgibson

currently using following versions;
Xafari 17.1.3011.1189
XAF 17.1.3

Sasha (Xafari Support)Client

Thanks for the additional information.
We are going to investigate it. It will take some additional time.

Best regards,
Sasha.

Sasha (Xafari Support)Client

Hello Michael,

We are going to fix the bug in next build.
As temporary solution, you can disable the ActionSuccessMessageController.

public partial class YouNewController: Controller
{
...
protected override void OnActivated()
{
base.OnActivated();
if (this.Frame.GetController() != null)
this.Frame.GetController().Active.SetItemValue("", false);
}
...
}

Let us know if you need further assistance.
Best regards,
Sasha.

× This ticket is closed.

Write US