private void EditAction_Execute(object sender, SimpleActionExecuteEventArgs e) { ViewUrlHelper urlHelper = (ViewUrlHelper)((BlazorApplication)Application).ServiceProvider.GetService(typeof(ViewUrlHelper)); string viewId = Application.GetDetailViewId(View.ObjectTypeInfo.Type); string objectKey = ObjectSpace.GetKeyValueAsString(e.CurrentObject); urlHelper.NavigateToView(viewId, objectKey); }
protected override void OnAfterRender() { base.OnAfterRender(); ViewShortcut viewShortcut = GetViewShortcut(); if (string.IsNullOrEmpty(viewShortcut.ViewId) && string.IsNullOrEmpty(viewShortcut.ObjectKey)) { ViewShortcut startupViewShortcut = GetStartupViewShortcut(); if (startupViewShortcut == null) { throw new Exception("Startup view is not found"); } ViewUrlHelper.NavigateToView(startupViewShortcut.ViewId); } ViewID = null; }