XAF - Merge User Differences from a Custom Model Storage

XAF Team Blog
22 April 2011

Recently, we announced a new Model Merge feature that will be available with the v2011 vol 1 release.  There was a lot of positive feedback in comments, thanks for that. But the question was - if it is possible to merge a user model stored in a database (this approach is described in the K18137 knowledge base article). The answer is YES, it is possible. All you need is to add a simple Controller that contains Export User Differences and Import User Differences actions.


The Export User Differences action exports user model differences from a database (or another custom storage) to a regular XAFML file that can be opened in the Model Merge Tool at design time. The capability to import XAFML files is provided by the Import User Differences action. We will have updated the K18137 article by the upcoming release to illustrate this Controller implementation.

Application administrators can use the Model Merge feature too.  Of course they have no access to the application source. But they can merge differences into a common model layer that is typically stored in the Model.xafml file in the application folder. This can be done via the Merge Differences command available in Model Editor at runtime.


So, an administrator can customize a View, and then provide it to all users without disturbing the application developer. In this instance, the Model.xafml file must be shared among all end-users. If terminal server deployment is used, this file is shared initially. Otherwise, an administrator needs to re-deploy the Model.xafml file for all users.  However, database storage can be also implemented for the shared model layer, by handling the XafApplication.CreateCustomModelDifferenceStore event. We will have updated the K18137 article by the upcoming release to show how to handle this event.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.