Current filter:
                                You should refresh the page.
                                  • Hi, I'm building a XAF ASP.NET Application with XPO and SQL Server.

                                    I've extended the PermissionPolicyUser class to add some properties that I need, and also I've created a relation between the extended table and a couple of more tables in my DB.

                                    I want to create a secondary Login window that will appear as a modal page when the user succesfully logs in. In this secondary window the user must choose some options that are related to the user: Contracts available, Accounts and also Addresses for those Accounts.

                                    If the user does not select anything or tries to close this window, log in process must be interrupted and the flow returns to the Primary login window (with textboxes for user and password).

                                    In the secondary Login window I need to load three LookupListViews, and the user must choose one option in every one of these lists. Furthermore, one of the listboxes is linked to the other, so it will show data related (once the user chooses an Account, the AddressesLookup will show just the addresses of this account).

                                    How can I achieve this? I've examined the documentation and it explains how to create a brand new login window, but I don't need that, I just need a secondary login window, place and load some Lookups there and force the user to choose some options before the login process can be completed.

                                    Thanks in advance,

                                    Jesus

                                1 Solution

                                Creation Date Importance Sort by

                                Hello Jesus,

                                At the moment, we do not have any ready examples that show how to complete this task.
                                But, I suggest you consider the following approach:

                                1. Handle the XafApplication.LoggingOn event and show the pop-up window (the Xaf in Web Login pop-up window and XAF Web app: how to create popup windows without using actions threads can be helpful) before the standard authentication is executed.
                                2. In this pop-up window, you can get the user by login parameters passed along with LogonEventArgs and display necessary editors with values obtained from this user.
                                3. On accepting the pop-up window, you can check if all values were set correctly and return the control to the standard authentication or raise an exception in case something went wrong.

                                Please let me know if any additional questions arise and we would appreciate it if you share your solution with the XAF community.

                                Thanks,
                                Anton.