Current filter:
                                You should refresh the page.

                                1 Solution

                                Creation Date Importance Sort by


                                If you mean that you need to add an additional action to the Logon Form using the Action attribute, you can do this. Create custom logon parameters as described in the How to: Use Custom Logon Parameters and Authentication article and add a method with the Action attribute applied in it. The default action container for such actions is RecordEdit. But, the Logon Form uses the PopupActions action container. So, move your action to the PopupActions action container in the Model Editor as described in the Place an Action in a Different Location article. Then, the ObjectMethodActionsViewController creates actions implemented using the Action attribute. The Logon Form does not create additional controllers by default. It's necessary to create an ObjectMethodActionsViewController instance manually as described in the Logon Form Controllers and Actions article.

                                Show all comments
                                • Customer78262 08.08.2019

                                  Hi Gosha,

                                  Many Thanks for the Information.
                                  Just to be clear before starting my work I have attached an attachment which shows what I m trying to achieve.
                                  Creating Additional button (action) Generate Grid which on clicking gets 64 base string from C# class function and display it as an Image.

                                  I have already created extra Fields Company and Grid Code using How to: Use Custom Logon Parameters and Authentication article.

                                  Is this achievable by solution reffered by you.

                                • Gosha (DevExpress Support) 08.08.2019

                                  Yes, you can use my solution to achieve this. I suggest you try it in action.

                                • Customer78262 08.14.2019

                                  Hi Gosha,

                                  I am trying to implement your suggestion step-by-step but I have not succeed,

                                  1.) I have CompanyLogonParameters.cs and WebCompanyLogonParameters .cs, which is used to customize standard logon Parameters.
                                       and is displaying the extra fields on Login Page.

                                  2.) I have MultiCompanyLogonController inherited from LogonController, which runs Accept action when Built-in Logon Button clicked from Login Page.

                                  3.) Then I tried to add new action in both Controller and CompanyLogonParameter class but the Button never shows up in Login Page.

                                  In the suggestion above it's using ViewController but I want to display that on Login Page. I have tried all possible ideas found on the Website with no success.

                                  I am attaching the code files, where u can see all commented out section I have tried. Could you please have a look at it what is missing ?

                                  Your help is really appreciated. Many Thanks.

                                • Gosha (DevExpress Support) 08.14.2019


                                  First, I remove the TargetObjectsCriteria property from your action since it uses the IsCompleted property. But, this property does not exist in your custom LogonParameters class.

                                  Since you didn't provide your Model XAFML file, I'm not sure if you moved your action from the PopupActions action container to the PopupActions action container. I did this:


                                  Then, I don't see where you create an ObjectMethodActionsViewController instance in the XafApplication.CreateCustomLogonWindowControllers event handler as described in the Logon Form Controllers and Actions. I also added this:


                                  After this, your action appears on the Logon Form:


                                • Customer78262 08.15.2019


                                  Firstly, many many thanks for the supoort being provided by DevExpress Team.
                                  It's really appreciated.

                                  I have done exactly the same but it's still not appearing on my Logon Form.


                                  [Action(Caption="GenerateGrid")] public void GenerateGrid() { }


                                  public TestAspNetApplication() { this.InitializeComponent(); this.CreateCustomLogonWindowControllers+= TestAspNetApplication_CreateCustomLogonWindowControllers; } void TestAspNetApplication_CreateCustomLogonWindowControllers(object sender, CreateCustomLogonWindowControllersEventArgs e) { e.Controllers.Add(this.CreateController<ObjectMethodActionsViewController>()); } protected override LogonController CreateLogonController() { return this.CreateController<MultiCompanyLogonController>(); }

                                  Also, action added under PopupActions in Model.xafml But GenerateGrid Action is not visible under Actions. Could this be the reason ?

                                  In Module.cs   I already had CreateCustomloginWindowController, so I also tries to add the code here but didn't work.

                                  public TestAspNetModule() { this.InitializeComponent(); RegisterThemeAssemblyController.RegisterCss("App_Themes/Test.css"); } protected override IEnumerable<Type> GetDeclaredExportedTypes() { return new[] { typeof(WebCompanyLogonParameters) }; } public override void Setup(XafApplication application) { base.Setup(application); application.CreateCustomLogonWindowControllers += ApplicationCreateCustomLogonWindowControllers; } static void ApplicationCreateCustomLogonWindowControllers(object sender, CreateCustomLogonWindowControllersEventArgs e) { e.Controllers.Add(new ObjectMethodActionsViewController()); //added... e.Controllers.Add(new SetApplicationSpecificThemeWebController()); } } }
                                • Customer78262 08.15.2019

                                  Model.xafml pic

                                • Customer78262 08.15.2019

                                  Hi Gosha,

                                  It did work for me now :-)

                                  I have added the action to MultiCompanyLogonController instead of CompanyLogonParameters.cs.

                                  public class MultiCompanyLogonController : LogonController { private PopupWindowShowAction GenerateGrid; private IContainer components; private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.GenerateGrid = new DevExpress.ExpressApp.Actions.PopupWindowShowAction(this.components); // // GenerateGrid // this.GenerateGrid.AcceptButtonCaption = null; this.GenerateGrid.CancelButtonCaption = null; this.GenerateGrid.Caption = "Generate Grid"; this.GenerateGrid.Category = "PopupActions"; this.GenerateGrid.ConfirmationMessage = null; this.GenerateGrid.Id = "GenerateGrid"; this.GenerateGrid.ToolTip = null; } }

                                  Many Many thanks for your support.

                                  I might have to bother again if stuck in next step.


                                • Customer78262 08.15.2019

                                  Hi Gosh,

                                  How can I now add an action to Generate grid Button.
                                  when I click it, it should call a function (Test.Module.Impl.GridTrue.generateGridTrueImageCode())that returns base 64 string and dislay it as Igae on same LoginPage.

                                  Also, I noticed an issue, Generate Grid button disappears if I click on Cancel.

                                • Dennis (DevExpress) 08.15.2019


                                  I've created a separate ticket on your behalf (T806888: How to display and update a custom View Item on a logon form using an Action). It has been placed in our processing queue and will be answered shortly.