Refer to the A reusable XAF module for storing model settings in the database (security system type insensitive!) forum thread for more details about this solution.
To use this custom module in your project, do the following:
1. Include the DatabaseUserSettings project into your solution;
2. Rebuild your solution and invoke the Module Designer for the YourSolution.Module project as described in the corresponding documentation;
3. Locate the DatabaseUserSettings component in the Toolbox and drop it on the designer surface as described in the "Add a Custom Module" section.
Check out the Application Solution Components help article for more details on using custom XAF modules.
IMPORTANT NOTES
1. Be aware of the following issue with this example: User settings may be duplicated/overridden under certain circumstances after merging configurator and user settings applied to the same element
2. This example solution is not yet tested in the middle-tier and SecuredObjectSpaceProvider scenario and most likely, it will have to be modified to support its specifics.
Example Comments
Added By: Pawel Rymarczyk 1 at: 5/20/2012 9:35:40 AM
Hi,
Not working with DbUpdater 11.2.
Ticket: http://www.devexpress.com/Support/Center/Question/Details/Q400938
Added By: Sandro Welter (Intelligix) at: 7/6/2012 1:14:37 PMHi,
I need this example in 12.1 version. Thanks.
Added By: Robert Fuchs at: 7/11/2012 11:25:44 AM> Take special note that it is important to grant write permissions for
> your persistent model differences classes to the anonymous user:
AFAIR the new security system does not need an anonymous user any more?
Added By: Miles at: 7/12/2012 3:44:42 PM12.1 version please!
Added By: Frank (DataJunxion) at: 8/11/2012 2:00:41 AM12.1 version?
Added By: John Botibol at: 9/12/2012 4:09:39 AMHi Guys, the Issue (Q421353) mentioned above as one to be aware of is marked as private so this is quite tricky!
Added By: Paolo Parente at: 10/31/2012 10:21:27 AMHi, is there a way to download the whole solution, without select every single file?
Thanks,
Paolo
Ok, i did it.
But now i've a question: i can i deploy the new Model.xafml when a new version of the application has been developed?
Thanks,
Paolo
I have the same problem as Paolo: How to handle the case when a new softare version with another Model.xafml must be distributed? Is there a ay to do this?
Added By: Dennis (DevExpress Support) at: 11/6/2012 3:03:35 PMI have answered your question about deploying the new version in http://www.devexpress.com/Support/Center/Issues/ViewIssue.aspx?issueid=Q443198
Added By: Robert Fuchs at: 12/15/2012 1:38:45 PMhttp://www.devexpress.com/issue=Q421353 is still private.
Is it fixed in the 12.2 example?
Iuse linq queries and Custom fields on model.xafml following http://www.devexpress.com/Support/Center/Example/Details/E859. I get exception on project start up: An error with number 1009 has occurred.
Error message: Error occurs while adding the 'FieldName_Linq' custom property ('System.Double' property type) to the 'MyClassName' type: 'Object reference not set to an instance of an object.'
Guys, please refer to the public http://www.devexpress.com/issue=Q470416 ticket instead of the private Q421353 one.
Added By: Mr292 at: 1/30/2013 8:44:44 PMDennis, Thanks a lot for this. I had implemented something similar before but I have now moved to your code so as to take advantage of any future changes.
I have a few questions though
1. Does the Model.xafml in the Program Folder get hit at all? It does not seem like it from the code, but wanted to be sure.
2. I had implemented a feature where on exit, the configurator would be prompted to store changes. I have modified this to do the same but in my implementation, the user was being prompted twice. This I have noticed is an issue with a lot of functions in XAF but is usually solvable easily. In this instance, what should I check for to disable the consecutive prompt?
3. Lastly, Just so some users are aware I was having issues saving Chart/Pivot Settings as XML in MySQL if I use latin1 in innodb. Not your fault but I had implemented a BLOB save instead to get over that.
How can I logon by Configurator user, if domain authentication used?
Added By: Nate Laff at: 4/12/2013 11:09:31 AMImplemented this yesterday after using the example of this from a long time ago (admin mode) and overall I like it.
Administrator users in my opinion shouldn't be able to see the User Settings navigation item. Unfortunately Q485525 prevents this from happening easily. Or am I missing something that this should be visible to Administrator. Seems like only Configurator should see it.
Added By: Nate Laff at: 4/16/2013 5:29:56 PMAlso, this has been an issue since the first iterations of this. If you make changes to the Win model at the highest level (Model.xafml) such as moving the location of MyDetails, these changes always get messed up. In the current scenario, MyDetails shows up in the navigation group I specified, but also gets duplicated in the default group after you logon with the Configurator user. Does this happen to anyone else?
Added By: Nate Laff at: 4/16/2013 6:03:33 PMAlso, what's the process here? Let's say you want to make a global change to a view as Configurator..
Log on as Configurator
Make changes
Exit
Log on as Configurator
Manage User Settings action, import from source Configurator to all users
Exit
Log on as User
Verify changes
Is that the process? Am I missing something. The exits are required?
Also, you can't reset to defaults without opening Model Editor as configurator, resetting there, exiting, manage user settings and import from Configurator source again?
Just trying to make sure I have this process down correctly.
Added By: Nate Laff at: 5/2/2013 2:06:59 PMDennis?
Added By: zacarias de prado habela at: 7/26/2013 7:31:49 AMHi:
Where is "XPManageUserSettingsParameter", "XPUserSettings", XPUserSettingsAspect defined?
Thanks
These classes are defined in the DatabaseUserSettings module. Use the Visual Studio search facilities to locate them...
Added By: Gabriel at: 9/24/2013 1:54:17 PMMy happy day :D